Advertisement
Failip420

Flutter Starter Project

Jul 2nd, 2020
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.97 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6.   // This widget is the root of your application.
  7.   @override
  8.   Widget build(BuildContext context) {
  9.     return MaterialApp(
  10.       debugShowCheckedModeBanner: false,
  11.       home: MyHomePage(),
  12.     );
  13.   }
  14. }
  15.  
  16. class MyHomePage extends StatefulWidget {
  17.   @override
  18.   _MyHomePageState createState() => _MyHomePageState();
  19. }
  20.  
  21. class _MyHomePageState extends State<MyHomePage> {
  22.   @override
  23.   Widget build(BuildContext context) {
  24.     return Scaffold(
  25.         appBar: AppBar(
  26.           elevation: 0,
  27.           titleSpacing: 0,
  28.           title: Row(
  29.             children: [
  30.               Expanded(
  31.                 child: Container(
  32.                   child: Center(child: Text('Title')),
  33.                 ),
  34.               ),
  35.             ],
  36.           ),
  37.         ),
  38.         body: Container(
  39.           child: SafeArea(child: Container()),
  40.         ));
  41.   }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement