Commit 3082d297 by Mobile : Art

updateSettingPage

parent 6caf2a54
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="c1439925-efc2-4fdb-a5ea-1a37e7dbf139" name="Default Changelist" comment=""> <list default="true" id="c1439925-efc2-4fdb-a5ea-1a37e7dbf139" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/lib/screen/history/history_page.dart" afterDir="false" /> <change afterPath="$PROJECT_DIR$/lib/screen/setting/setting_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/screen/notification/notification_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/notification/notification_page.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/lib/components/appbar_logo.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/components/appbar_logo.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/components/appbar_title.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/components/appbar_title.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/screen/news/news_page.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/screen/news/news_page.dart" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
......
...@@ -2,12 +2,14 @@ import 'package:flutter/material.dart'; ...@@ -2,12 +2,14 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_slider_drawer/flutter_slider_drawer.dart'; import 'package:flutter_slider_drawer/flutter_slider_drawer.dart';
import 'package:nbt_app/screen/catch%20up/catchup_page.dart'; import 'package:nbt_app/screen/catch%20up/catchup_page.dart';
import 'package:nbt_app/screen/history/history_page.dart';
import 'package:nbt_app/screen/home/home_page.dart'; import 'package:nbt_app/screen/home/home_page.dart';
import 'package:nbt_app/screen/login/login_page.dart'; import 'package:nbt_app/screen/login/login_page.dart';
import 'package:nbt_app/screen/news/news_page.dart'; import 'package:nbt_app/screen/news/news_page.dart';
import 'package:nbt_app/screen/notification/FavouriteList_Page.dart'; import 'package:nbt_app/screen/notification/FavouriteList_Page.dart';
import 'package:nbt_app/screen/notification/notification_page.dart'; import 'package:nbt_app/screen/notification/notification_page.dart';
import 'package:nbt_app/screen/register/register_page.dart'; import 'package:nbt_app/screen/register/register_page.dart';
import 'package:nbt_app/screen/setting/setting_page.dart';
class AppBarLogo extends StatefulWidget { class AppBarLogo extends StatefulWidget {
bool isShowBackButton; bool isShowBackButton;
...@@ -60,7 +62,7 @@ class _AppBarLogoState extends State<AppBarLogo> { ...@@ -60,7 +62,7 @@ class _AppBarLogoState extends State<AppBarLogo> {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
Navigator.pushReplacement( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => NotificationPage())); builder: (context) => NotificationPage()));
...@@ -517,7 +519,7 @@ class _AppBarLogoState extends State<AppBarLogo> { ...@@ -517,7 +519,7 @@ class _AppBarLogoState extends State<AppBarLogo> {
width: 120.w, width: 120.w,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Navigator.pushReplacement(context, Navigator.push(context,
MaterialPageRoute(builder: (context) => LoginPage())); MaterialPageRoute(builder: (context) => LoginPage()));
}, },
child: Container( child: Container(
...@@ -703,7 +705,7 @@ class _AppBarLogoState extends State<AppBarLogo> { ...@@ -703,7 +705,7 @@ class _AppBarLogoState extends State<AppBarLogo> {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.pushReplacement(context, Navigator.push(context,
MaterialPageRoute(builder: (context) => CatchupPage())); MaterialPageRoute(builder: (context) => CatchupPage()));
}, },
child: Row( child: Row(
......
...@@ -47,7 +47,7 @@ class AppbarTitle extends StatelessWidget { ...@@ -47,7 +47,7 @@ class AppbarTitle extends StatelessWidget {
// ), // ),
// Spacer(), // Spacer(),
SizedBox( SizedBox(
width: 50, width: 100,
), ),
Container( Container(
// alignment: Alignment.topCenter, // alignment: Alignment.topCenter,
......
...@@ -34,7 +34,7 @@ class _NewsPageState extends State<NewsPage> { ...@@ -34,7 +34,7 @@ class _NewsPageState extends State<NewsPage> {
backgroundColor: Color.fromRGBO(77, 32, 126, 1), backgroundColor: Color.fromRGBO(77, 32, 126, 1),
toolbarHeight: 80.h, toolbarHeight: 80.h,
title: AppbarTitle( title: AppbarTitle(
title: 'ลงทะเบียน / ยืนยันตัวตน', title: 'ข่าว',
), ),
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
......
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:nbt_app/components/appbar_logo.dart';
import 'package:nbt_app/components/appbar_title.dart';
class SettingPage extends StatefulWidget {
const SettingPage({Key? key}) : super(key: key);
@override
_SettingPageState createState() => _SettingPageState();
}
class _SettingPageState extends State<SettingPage> {
bool isSwitched = false;
@override
Widget build(BuildContext context) {
ScreenUtil.init(
BoxConstraints(
maxWidth: MediaQuery.of(context).size.width,
maxHeight: MediaQuery.of(context).size.height),
designSize: Size(360, 690),
context: context,
minTextAdapt: true,
orientation: Orientation.portrait);
return Scaffold(
appBar: AppBar(
elevation: 0.55,
shadowColor: Color.fromRGBO(77, 32, 126, 1),
bottomOpacity: 0,
backgroundColor: Color.fromRGBO(77, 32, 126, 1),
toolbarHeight: 80.h,
title: AppbarTitle(
title: 'การตั้งค่า',
),
),
body: Stack(
children: [
Container(
color: Color.fromRGBO(77, 32, 126, 1),
height: 50.h,
),
Container(
margin: EdgeInsets.only(left: 15.h, right: 15.h),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
border: Border.all(
color: Colors.white,
style: BorderStyle.solid,
width: 1.0,
),
color: Colors.white,
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
children: [
SizedBox(
height: 10,
),
Row(
children: [
Container(
child: Text(
'การแจ้งเตือนข้อความ',
style: TextStyle(
color: Colors.black,
// color: Color.fromRGBO(77, 32, 126, 1),
fontFamily: 'DBHeavent',
fontSize: 24,
fontWeight: FontWeight.w500,
letterSpacing: 1,
),
),
margin: EdgeInsets.only(top: 10, left: 30),
alignment: Alignment.topLeft,
),
Spacer(),
Container(
margin: EdgeInsets.only(top: 10, left: 10),
child: Transform.scale(
scale: 1.5,
child: Switch(
activeColor: Color.fromRGBO(77, 32, 126, 1),
value: isSwitched,
onChanged: (value) {
setState(() {
isSwitched = value;
});
},
),
),
),
SizedBox(
width: 30,
),
],
),
Row(
children: [
Container(
child: Text(
'การแจ้งเตือนข้อความ',
style: TextStyle(
color: Colors.black,
// color: Color.fromRGBO(77, 32, 126, 1),
fontFamily: 'DBHeavent',
fontSize: 24,
fontWeight: FontWeight.w500,
letterSpacing: 1,
),
),
margin: EdgeInsets.only(top: 0, left: 30),
alignment: Alignment.topLeft,
),
Spacer(),
Container(
margin: EdgeInsets.only(top: 0, left: 10),
child: Transform.scale(
scale: 1.5,
child: Switch(
activeColor: Color.fromRGBO(77, 32, 126, 1),
value: isSwitched,
onChanged: (value) {
setState(() {
isSwitched = value;
});
},
),
),
),
SizedBox(
width: 30,
),
],
),
],
),
),
],
),
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment