|
| 1 | +/** |
| 2 | + * Author: Damodar Lohani |
| 3 | + * profile: https://github.com/lohanidamodar |
| 4 | + */ |
| 5 | + |
| 6 | +import 'package:flutter/material.dart'; |
| 7 | +import 'package:cached_network_image/cached_network_image.dart'; |
| 8 | +import 'package:flutter_ui_challenges/core/presentation/res/assets.dart'; |
| 9 | +import 'package:flutter_ui_challenges/src/pages/invitation/inlanding.dart'; |
| 10 | + |
| 11 | +class SettingsTwoPage extends StatelessWidget { |
| 12 | + static final String path = "lib/src/pages/settings/settings1.dart"; |
| 13 | + final TextStyle whiteText = TextStyle( |
| 14 | + color: Colors.white, |
| 15 | + ); |
| 16 | + final TextStyle greyTExt = TextStyle( |
| 17 | + color: Colors.grey.shade400, |
| 18 | + ); |
| 19 | + @override |
| 20 | + Widget build(BuildContext context) { |
| 21 | + return Scaffold( |
| 22 | + backgroundColor: Colors.black, |
| 23 | + body: Theme( |
| 24 | + data: Theme.of(context).copyWith( |
| 25 | + brightness: Brightness.dark, |
| 26 | + primaryColor: Colors.purple, |
| 27 | + ), |
| 28 | + child: DefaultTextStyle( |
| 29 | + style: TextStyle( |
| 30 | + color: Colors.white, |
| 31 | + ), |
| 32 | + child: SingleChildScrollView( |
| 33 | + padding: const EdgeInsets.all(32.0), |
| 34 | + child: Column( |
| 35 | + children: <Widget>[ |
| 36 | + const SizedBox(height: 30.0), |
| 37 | + Row( |
| 38 | + children: <Widget>[ |
| 39 | + Container( |
| 40 | + width: 60, |
| 41 | + height: 60, |
| 42 | + decoration: BoxDecoration( |
| 43 | + color: Colors.white, |
| 44 | + shape: BoxShape.circle, |
| 45 | + image: DecorationImage( |
| 46 | + image: CachedNetworkImageProvider(avatars[1]), |
| 47 | + fit: BoxFit.cover, |
| 48 | + ), |
| 49 | + border: Border.all(color: Colors.white,width: 2.0,), |
| 50 | + ), |
| 51 | + ), |
| 52 | + const SizedBox(width: 10.0), |
| 53 | + Expanded( |
| 54 | + child: Column( |
| 55 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 56 | + children: <Widget>[ |
| 57 | + Text("Jane Doe", style: TextStyle( |
| 58 | + fontWeight: FontWeight.bold, |
| 59 | + fontSize: 20.0, |
| 60 | + ),), |
| 61 | + Text("Nepal",style: TextStyle( |
| 62 | + color: Colors.grey.shade400, |
| 63 | + ),), |
| 64 | + ], |
| 65 | + ), |
| 66 | + ), |
| 67 | + ], |
| 68 | + ), |
| 69 | + |
| 70 | + const SizedBox(height: 20.0), |
| 71 | + ListTile( |
| 72 | + title: Text("Languages",style: whiteBoldText,), |
| 73 | + subtitle: Text("English US",style: greyTExt,), |
| 74 | + trailing: Icon(Icons.keyboard_arrow_right,color: Colors.grey.shade400,), |
| 75 | + onTap: (){}, |
| 76 | + ), |
| 77 | + ListTile( |
| 78 | + title: Text("Profile Settings",style: whiteBoldText,), |
| 79 | + subtitle: Text("Jane Doe",style: greyTExt,), |
| 80 | + trailing: Icon(Icons.keyboard_arrow_right,color: Colors.grey.shade400,), |
| 81 | + onTap: (){}, |
| 82 | + ), |
| 83 | + SwitchListTile( |
| 84 | + title: Text("Email Notifications",style: whiteBoldText,), |
| 85 | + subtitle: Text("On",style: greyTExt,), |
| 86 | + value: true, |
| 87 | + onChanged: (val){}, |
| 88 | + ), |
| 89 | + SwitchListTile( |
| 90 | + title: Text("Push Notifications",style: whiteBoldText,), |
| 91 | + subtitle: Text("Off",style: greyTExt,), |
| 92 | + value: false, |
| 93 | + onChanged: (val){}, |
| 94 | + ), |
| 95 | + ListTile( |
| 96 | + title: Text("Logout",style: whiteBoldText,), |
| 97 | + onTap: (){}, |
| 98 | + ), |
| 99 | + ], |
| 100 | + ), |
| 101 | + ), |
| 102 | + ), |
| 103 | + ), |
| 104 | + ); |
| 105 | + } |
| 106 | +} |
0 commit comments