Dart or Flutter Starting Point with SafeArea

import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: SafeArea( child: MyHomePage(), ), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.black, body: Center( child: Padding( padding: const EdgeInsets.all(10.0), child: Column(children: <Widget>[ Text( 'SCOTT SAUNDERS', textAlign: TextAlign.center, overflow: TextOverflow.ellipsis, style: TextStyle( fontWeight: FontWeight.normal, color: Colors.white.withOpacity(0.8), fontSize: 36.0, fontFamily: 'Montserrat', ), ), SingleChildScrollView( child: new Text( "Lorem ipsum dolor sit amet, consectetur adipiscing elit. In maximus eget augue vel ultricies. Phasellus mollis feugiat nulla a consectetur. Quisque lorem purus, consequat quis ultrices id, rhoncus eget massa. Proin quis nibh ante. Aliquam egestas ornare quam, venenatis facilisis magna molestie et. Integer nibh erat, blandit eu maximus ac, commodo sit amet risus. In eu sem in purus hendrerit interdum quis et leo. Sed nulla massa, blandit vel fringilla at, cursus id massa. Aenean accumsan vitae ipsum mollis laoreet. Vivamus eget sapien sit amet neque tempus mattis a vitae nunc. Nam eu justo a dolor mollis vehicula. Vivamus eget odio congue, venenatis massa et, luctus ante.", style: new TextStyle( fontSize: 18.0, color: Colors.white, fontFamily: 'Montserrat', ), ), ), ]), ), ), ); } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.