Skip to content

Instantly share code, notes, and snippets.

@Luccasoli
Created January 2, 2020 23:47
Show Gist options
  • Save Luccasoli/b6979ec50efaf107225b7be4f2516bbd to your computer and use it in GitHub Desktop.
Save Luccasoli/b6979ec50efaf107225b7be4f2516bbd to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView(
children: <Widget>[
Container(
height: 300, // <- Se comentar essa altura, a listView desaparece
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('Ala'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
Column(children: <Widget>[
Container(
height: 30,
width: 80,
color: Colors.red,
child: Text('1'),
),
Container(
color: Colors.red,
child: Text('1'),
),
]),
],
),
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment