Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() => runApp(MyApp());
  4.  
  5. class MyApp extends StatelessWidget {
  6. @override
  7. Widget build(BuildContext context) {
  8. return MaterialApp(
  9. home: FirstPage(),
  10. );
  11. }
  12. }
  13.  
  14. class FirstPage extends StatelessWidget {
  15. @override
  16. Widget build(BuildContext context) {
  17. return Scaffold(
  18. floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
  19. floatingActionButton: FloatingActionButton(
  20. child: Icon(
  21. Icons.add,
  22. color: Colors.white,
  23. ),
  24. backgroundColor: Colors.black,
  25. onPressed: () {
  26. Navigator.of(context).push(
  27. MaterialPageRoute(
  28. builder: (context) => SecondPage(),
  29. ),
  30. );
  31. },
  32. ),
  33. bottomNavigationBar: BottomAppBar(
  34. color: Colors.blue,
  35. child: Row(
  36. mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  37. children: <Widget>[
  38. IconButton(icon: Icon(Icons.home), onPressed: () {}),
  39. IconButton(icon: Icon(Icons.people), onPressed: () {}),
  40. ],
  41. ),
  42. ),
  43. body: Center(
  44. child: Column(
  45. children: <Widget>[],
  46. ),
  47. ),
  48. );
  49. }
  50. }
  51.  
  52. class SecondPage extends StatelessWidget {
  53. @override
  54. Widget build(BuildContext context) {
  55. return Scaffold(
  56. backgroundColor: Colors.black,
  57. body: Column(
  58. children: <Widget>[
  59. Container(
  60. height: 50,
  61. width: 100,
  62. color: Colors.white,
  63. decoration: BoxDecoration(
  64. borderRadius: BorderRadius.circular(20),
  65. ),
  66. child: TextField(
  67. style: TextStyle(color: Colors.white),
  68. controller: TextEditingController(),
  69. decoration: InputDecoration(
  70. enabledBorder: OutlineInputBorder(
  71. borderSide: BorderSide(color: Colors.red))),
  72. ),
  73. )
  74. ],
  75. ),
  76. );
  77. }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement