Last active
February 24, 2021 11:35
-
-
Save misterfourtytwo/9ab235b417a4de24c6f3217f1469311a to your computer and use it in GitHub Desktop.
singleChildScrollView
This file contains hidden or 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) { | |
final _workTimeTracker = SizedBox(height: 42); | |
final _endWorkDayButton = SizedBox(height: 42); | |
final _chooseWorkButton = SizedBox(height: 42); | |
final assignWorkButton = SizedBox(height: 42); | |
final historyButton = SizedBox(height: 42); | |
final diagramButton = SizedBox(height: 42); | |
final assignedWorkList = Container(child: SizedBox(height: 300), color: Colors.pink,); | |
return MaterialApp( | |
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: darkBlue), | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Center( | |
child: Container( | |
color: Colors.grey[850], | |
height: 700, | |
width: 270, | |
child: SingleChildScrollView( | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: [ | |
SizedBox( | |
height: 40, | |
), | |
Container( | |
color: Colors.blue, | |
padding: EdgeInsets.only(bottom: 6, top: 6), | |
child: _workTimeTracker, | |
), | |
SizedBox( | |
height: 40, | |
), | |
Container( | |
color: Colors.green, | |
height: 80, | |
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), | |
child: _endWorkDayButton, | |
), | |
Container( | |
height: 80, | |
color: Colors.red, | |
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), | |
child: _chooseWorkButton, | |
), | |
Container( | |
color: Colors.grey, | |
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 0), | |
height: 80, | |
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), | |
child: assignWorkButton, | |
), | |
Container( | |
color: Colors.yellow, | |
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 0), | |
height: 80, | |
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), | |
child: historyButton, | |
), | |
Container( | |
color: Colors.amber, | |
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 0), | |
height: 80, | |
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 0), | |
child: diagramButton, | |
), | |
assignedWorkList, | |
], | |
), | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment