Created
February 15, 2020 13:56
-
-
Save jimit24365/e7c5203bf2375e669edd9c3545b63fd0 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( | |
theme: ThemeData( | |
// Define the default brightness and colors. | |
brightness: Brightness.light, | |
primaryColor: Colors.lightBlue[800], | |
accentColor: Colors.cyan[600], | |
// Define the default font family. | |
fontFamily: 'Georgia', | |
// Define the default TextTheme. Use this to specify the default | |
// text styling for headlines, titles, bodies of text, and more. | |
textTheme: TextTheme( | |
headline: TextStyle(fontSize: 72.0, fontWeight: FontWeight.bold), | |
title: TextStyle(fontSize: 36.0, fontStyle: FontStyle.italic), | |
body1: TextStyle(fontSize: 14.0, fontFamily: 'Hind'), | |
), | |
), | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
appBar: AppBar(title: Text('Example App')), | |
body: Center( | |
child: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Text('Hello, World!', style: Theme.of(context).textTheme.headline4); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment