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 {
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: FirstPage(),
- );
- }
- }
- class FirstPage extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
- floatingActionButton: FloatingActionButton(
- child: Icon(
- Icons.add,
- color: Colors.white,
- ),
- backgroundColor: Colors.black,
- onPressed: () {
- Navigator.of(context).push(
- MaterialPageRoute(
- builder: (context) => SecondPage(),
- ),
- );
- },
- ),
- bottomNavigationBar: BottomAppBar(
- color: Colors.blue,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: <Widget>[
- IconButton(icon: Icon(Icons.home), onPressed: () {}),
- IconButton(icon: Icon(Icons.people), onPressed: () {}),
- ],
- ),
- ),
- body: Center(
- child: Column(
- children: <Widget>[],
- ),
- ),
- );
- }
- }
- class SecondPage extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.black,
- body: Column(
- children: <Widget>[
- Container(
- height: 50,
- width: 100,
- color: Colors.white,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(20),
- ),
- child: TextField(
- style: TextStyle(color: Colors.white),
- controller: TextEditingController(),
- decoration: InputDecoration(
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(color: Colors.red))),
- ),
- )
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement