1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
| class MyPage extends StatelessWidget { MyPage({Key? key}) : super(key: key); Widget titleSection = Container( padding: const EdgeInsets.all(32), child: Row( children: [ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Text( "Hello,this is Alice!", style: TextStyle( fontWeight: FontWeight.bold, ), ), Text( "Good evening!", style: TextStyle( color: Colors.grey[500], ), ) ], ), ), const Icon( Icons.star, color: Colors.red, ), const Text( "520", ) ], ), ); Widget options=Container( margin: const EdgeInsets.only(top: 10), child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Column( children: const [ Icon( Icons.call, color: Colors.blue, ), Text( "CALL", style: TextStyle( color: Colors.blue, ), ) ], ), Column( children: const [ Icon( Icons.route, color: Colors.blue, ), Text( "ROUTE", style: TextStyle( color: Colors.blue, ), ) ], ), Column( children: const [ Icon( Icons.share, color: Colors.blue, ), Text( "SHARE", style: TextStyle( color: Colors.blue, ), ) ], ), ], ), ); Widget text=Container( margin: const EdgeInsets.only(top: 10), padding: const EdgeInsets.all(30), child: const Text( "Something exciting happened when I got up this day. Maybe, but I am not sure about the time." ), ); @override Widget build(BuildContext context) { return Column( children: [ Image.asset( 'images/Alice.jpg', height: 300, fit: BoxFit.cover, ), titleSection, options, text ], ) ; } }
|