Created
January 2, 2020 23:47
-
-
Save Luccasoli/b6979ec50efaf107225b7be4f2516bbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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