upgrade packages
This commit is contained in:
@@ -148,12 +148,12 @@ class _HomePageState extends State<HomePage> {
|
||||
}
|
||||
|
||||
_initLocalNotifications() {
|
||||
var initializationSettingsAndroid =
|
||||
new AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
var initializationSettingsIOS = new IOSInitializationSettings();
|
||||
var initializationSettings = new InitializationSettings(
|
||||
android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
||||
_flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||
// var initializationSettingsAndroid =
|
||||
// new AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
// var initializationSettingsIOS = new IOSInitializationSettings();
|
||||
// var initializationSettings = new InitializationSettings(
|
||||
// android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
||||
// _flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||
}
|
||||
|
||||
static Future _showNotification(Map<String, dynamic> message) async {
|
||||
@@ -176,29 +176,29 @@ class _HomePageState extends State<HomePage> {
|
||||
print("AppPushs params pushAction : $action");
|
||||
|
||||
// @formatter:off
|
||||
var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
||||
'your channel id', 'your channel name', 'your channel description',
|
||||
playSound: true,
|
||||
enableVibration: true,
|
||||
importance: Importance.max,
|
||||
priority: Priority.high);
|
||||
// var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
||||
// 'your channel id', 'your channel name', 'your channel description',
|
||||
// playSound: true,
|
||||
// enableVibration: true,
|
||||
// importance: Importance.max,
|
||||
// priority: Priority.high);
|
||||
|
||||
// @formatter:on
|
||||
var platformChannelSpecificsIos =
|
||||
new IOSNotificationDetails(presentSound: true);
|
||||
var platformChannelSpecifics = new NotificationDetails(
|
||||
android: platformChannelSpecificsAndroid,
|
||||
iOS: platformChannelSpecificsIos);
|
||||
// var platformChannelSpecificsIos =
|
||||
// new IOSNotificationDetails(presentSound: true);
|
||||
// var platformChannelSpecifics = new NotificationDetails(
|
||||
// android: platformChannelSpecificsAndroid,
|
||||
// iOS: platformChannelSpecificsIos);
|
||||
|
||||
new Future.delayed(Duration.zero, () {
|
||||
_flutterLocalNotificationsPlugin.show(
|
||||
0,
|
||||
pushTitle,
|
||||
pushText,
|
||||
platformChannelSpecifics,
|
||||
payload: 'No_Sound',
|
||||
);
|
||||
});
|
||||
// new Future.delayed(Duration.zero, () {
|
||||
// _flutterLocalNotificationsPlugin.show(
|
||||
// 0,
|
||||
// pushTitle,
|
||||
// pushText,
|
||||
// platformChannelSpecifics,
|
||||
// payload: 'No_Sound',
|
||||
// );
|
||||
// });
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
@@ -387,7 +387,7 @@ class _HomePageState extends State<HomePage> {
|
||||
isSelected: languageModel.currentState,
|
||||
selectedBorderColor: Colors.white24,
|
||||
);
|
||||
final signinBtn = FlatButton(
|
||||
final signinBtn = TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(CupertinoPageRoute(builder: (context) => SigninPage()));
|
||||
|
||||
@@ -19,7 +19,7 @@ Future showMsgDialog(BuildContext context, String title, String msg) {
|
||||
title: new Text(title),
|
||||
content: new Text(msg),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
new TextButton(
|
||||
child: new Text("Close"),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
@@ -51,8 +51,10 @@ Future<void> showConfirmDialog(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
FlatButton(
|
||||
color: Colors.grey[300],
|
||||
TextButton(
|
||||
style:
|
||||
TextButton.styleFrom(backgroundColor: Colors.grey[300]),
|
||||
// color: Colors.grey[300],
|
||||
child: Text(
|
||||
AppTranslations.of(context)!.text('btn.cancel'),
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
@@ -65,8 +67,9 @@ Future<void> showConfirmDialog(
|
||||
SizedBox(
|
||||
width: 0,
|
||||
),
|
||||
FlatButton(
|
||||
color: primaryColor,
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||
// color: primaryColor,
|
||||
child: Text(AppTranslations.of(context)!.text('btn.ok'),
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
? TextStyle(
|
||||
@@ -343,7 +346,7 @@ Widget fcsButton(BuildContext context, String text,
|
||||
child: ButtonTheme(
|
||||
minWidth: 900.0,
|
||||
height: 100.0,
|
||||
child: FlatButton(
|
||||
child: TextButton(
|
||||
onPressed: callack == null ? null : () => callack(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -371,7 +374,7 @@ String getLocalString(BuildContext context, String key) {
|
||||
}
|
||||
|
||||
void showToast(GlobalKey key, String text) {
|
||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
||||
final ScaffoldMessengerState scaffold = key.currentState as ScaffoldMessengerState;
|
||||
scaffold.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(text),
|
||||
|
||||
@@ -83,7 +83,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||
onPressed: _langChange,
|
||||
isSelected: isSelected,
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => SigninPage()));
|
||||
|
||||
Reference in New Issue
Block a user