Created
October 10, 2020 07:56
-
-
Save Eng-MFQ/0b6368a7afea572cf1885af19c5d82c4 to your computer and use it in GitHub Desktop.
FlutterStarterColumn
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
/// this is your APP Main screen configuration | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData( | |
// to change your app color change this | |
/// first color is for IOS the second color is for Android | |
/*******************--[focus here π§]--*******************/ | |
primaryColor: defaultTargetPlatform == TargetPlatform.iOS | |
? Colors.amber | |
: Colors.teal, | |
), | |
/*******************--[focus here π§]--*******************/ | |
home: MyHomePage(), | |
); | |
} | |
} | |
/// this is a template to start building a UI | |
/// to start adding any UI you want change what comes after the [ body: ] tag below | |
class MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
/*******************--[focus here π§]--*******************/ | |
return Scaffold( | |
backgroundColor: Colors.grey, | |
appBar: AppBar( | |
leading: Icon(Icons.smartphone), | |
title: Text('App Title'), | |
elevation: defaultTargetPlatform == TargetPlatform.iOS ? 0.0 : 4.0, | |
), | |
/*******************--[focus here π§]--*******************/ | |
body: myWidget(), | |
/*******************--[focus here π§]--*******************/ | |
); | |
} | |
Widget myWidget() { | |
return Container( | |
padding: EdgeInsets.all(20), | |
color: Colors.blueAccent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
/*******************--[focus here π§]--*******************/ | |
Text( | |
'Hi im a text', | |
), | |
Text( | |
'Hi im another text', | |
), | |
/*******************--[focus here π§]--*******************/ | |
], | |
), | |
); | |
} | |
} | |
/** FontFamily **/ | |
///'casual' | |
///'cursive' | |
///'monospace' | |
///'sans-serif-condensed' | |
///'sans-serif-smallcaps' | |
///'serif' | |
///'serif-monospace' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment