Skip to content

Instantly share code, notes, and snippets.

@Eng-MFQ
Created October 10, 2020 07:56
Show Gist options
  • Save Eng-MFQ/0b6368a7afea572cf1885af19c5d82c4 to your computer and use it in GitHub Desktop.
Save Eng-MFQ/0b6368a7afea572cf1885af19c5d82c4 to your computer and use it in GitHub Desktop.
FlutterStarterColumn
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