Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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(
- title: 'Flutter Demo',
- theme: ThemeData(
- primarySwatch: Colors.green,
- ),
- home: MyHomePage(title: 'Flutter Demo Home Page'),
- );
- }
- }
- class MyHomePage extends StatefulWidget {
- MyHomePage({Key key, this.title}) : super(key: key);
- final String title;
- @override
- _MyHomePageState createState() => _MyHomePageState();
- }
- class _MyHomePageState extends State<MyHomePage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Column(
- children: [
- //Title
- SafeArea(
- child: Container(
- margin: const EdgeInsets.all(30),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text("Dashboard",
- style: TextStyle(
- fontSize: 30,
- fontWeight: FontWeight.bold
- ),
- ),
- InkWell(
- child: Text("Create New",
- style: TextStyle(
- color: Colors.blue,
- fontSize: 15
- ),
- ),
- onLongPress: () {
- Scaffold.of(context).showSnackBar(
- SnackBar(
- content: Text('Have a snack!'),
- ),
- );
- }
- ),
- ],
- ),
- )
- )
- ]
- )
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement