Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hoàng Văn Đạt
mypoint_flutter_app
Commits
73074efa
Commit
73074efa
authored
Apr 18, 2025
by
DatHV
Browse files
update authen
parent
e8a305af
Changes
25
Hide whitespace changes
Inline
Side-by-side
lib/screen/otp/otp_screen.dart
View file @
73074efa
...
...
@@ -26,7 +26,7 @@ class _OtpScreenState extends BaseState<OtpScreen> with BasicState {
ever
(
otpVM
.
errorMessage
,
(
value
)
{
if
(
value
!=
null
&&
value
.
toString
().
isNotEmpty
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
showAlertError
(
value
);
showAlertError
(
content:
value
);
});
}
});
...
...
lib/screen/pageDetail/campaign_detail_screen.dart
View file @
73074efa
...
...
@@ -34,7 +34,7 @@ class _CampaignDetailScreenState extends BaseState<CampaignDetailScreen> with Ba
ever
(
_viewModel
.
errorMessage
,
(
value
)
{
if
(
value
!=
null
&&
value
.
toString
().
isNotEmpty
)
{
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
showAlertError
(
value
);
showAlertError
(
content:
value
);
});
}
});
...
...
lib/screen/setting/setting_screen.dart
0 → 100644
View file @
73074efa
// setting_screen.dart
import
'package:flutter/material.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get_core/src/get_main.dart'
;
import
'../../widgets/custom_app_bar.dart'
;
import
'../change_pass/change_pass_screen.dart'
;
class
SettingScreen
extends
StatelessWidget
{
const
SettingScreen
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
CustomAppBar
.
back
(
title:
"Cài đặt"
),
backgroundColor:
const
Color
(
0xFFF5F6F7
),
body:
Column
(
children:
[
Container
(
width:
double
.
infinity
,
margin:
const
EdgeInsets
.
symmetric
(
horizontal:
0
,
vertical:
16
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
// borderRadius: BorderRadius.circular(12),
// boxShadow: [
// BoxShadow(
// color: Colors.black12,
// blurRadius: 8,
// offset: const Offset(0, 4),
// ),
// ],
),
child:
Column
(
children:
[
_buildSettingItem
(
icon:
Icons
.
apps
,
title:
'Các lĩnh vực quan tâm'
,
onTap:
()
{},
),
_buildDivider
(),
_buildSettingItem
(
icon:
Icons
.
lock_outline
,
title:
'Đổi mật khẩu'
,
onTap:
()
=>
Get
.
to
(
ChangePassScreen
()),
),
_buildDivider
(),
_buildSettingItem
(
icon:
Icons
.
fingerprint
,
title:
'Xác thực sinh trắc học'
,
showTrailing:
false
,
onTap:
()
{},
),
_buildDivider
(),
_buildSettingItem
(
icon:
Icons
.
devices_other
,
title:
'Quản lý thiết bị đăng nhập'
,
onTap:
()
{},
),
_buildDivider
(),
_buildSettingItem
(
icon:
Icons
.
delete_outline
,
title:
'Xóa tài khoản'
,
onTap:
()
{},
textColor:
Colors
.
red
,
iconColor:
Colors
.
red
,
showTrailing:
false
,
),
],
),
),
const
Expanded
(
child:
SizedBox
()),
],
),
);
}
Widget
_buildSettingItem
({
required
IconData
icon
,
required
String
title
,
required
VoidCallback
onTap
,
Color
?
textColor
,
Color
?
iconColor
,
bool
showTrailing
=
true
,
})
{
return
ListTile
(
leading:
Icon
(
icon
,
color:
iconColor
??
Colors
.
black54
),
title:
Text
(
title
,
style:
TextStyle
(
fontSize:
16
,
color:
textColor
??
Colors
.
black87
,
fontWeight:
FontWeight
.
w500
,
),
),
trailing:
showTrailing
?
const
Icon
(
Icons
.
chevron_right
,
color:
Colors
.
black26
)
:
null
,
onTap:
onTap
,
contentPadding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
),
);
}
Widget
_buildDivider
()
{
return
const
Divider
(
height:
1
,
indent:
16
,
endIndent:
16
);
}
}
\ No newline at end of file
lib/widgets/alert/custom_alert_dialog.dart
View file @
73074efa
import
'package:flutter/material.dart'
;
import
'package:flutter_widget_from_html/flutter_widget_from_html.dart'
;
import
'package:get/get.dart'
;
import
'package:mypoint_flutter_app/resouce/define_image.dart'
;
import
'data_alert_model.dart'
;
enum
ButtonsDirection
{
row
,
column
}
...
...
lib/widgets/custom_app_bar.dart
0 → 100644
View file @
73074efa
import
'package:flutter/material.dart'
;
import
'back_button.dart'
;
class
CustomAppBar
extends
StatelessWidget
implements
PreferredSizeWidget
{
final
String
title
;
final
List
<
Widget
>
leftButtons
;
final
List
<
Widget
>
rightButtons
;
final
double
height
;
const
CustomAppBar
({
super
.
key
,
required
this
.
title
,
this
.
leftButtons
=
const
[],
this
.
rightButtons
=
const
[],
this
.
height
=
56
,
});
/// 🔥 AppBar mặc định với nút back và title
static
CustomAppBar
back
({
required
String
title
})
{
return
CustomAppBar
(
title:
title
,
leftButtons:
[
CustomBackButton
()],
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
SafeArea
(
child:
Container
(
height:
height
,
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
16
),
child:
Stack
(
alignment:
Alignment
.
center
,
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Row
(
children:
leftButtons
),
Row
(
children:
rightButtons
),
],
),
Center
(
child:
Text
(
title
,
style:
const
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
black87
,
),
),
),
],
),
),
);
}
@override
Size
get
preferredSize
=>
Size
.
fromHeight
(
height
);
}
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment