124 lines
4.2 KiB
Dart
124 lines
4.2 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|
import 'package:store_redirect/store_redirect.dart';
|
|
|
|
import 'package:aslan/app_localizations.dart';
|
|
import 'package:aslan/chatvibe_ui/components/text/at_text.dart';
|
|
import 'package:aslan/chatvibe_ui/theme/chatvibe_theme.dart';
|
|
import 'package:aslan/chatvibe_domain/models/res/at_version_manage_latest_res.dart';
|
|
|
|
class AppVersionUpdatePage extends StatefulWidget {
|
|
ATVersionManageLatestRes result;
|
|
|
|
AppVersionUpdatePage(this.result);
|
|
|
|
@override
|
|
_AppVersionUpdatePageState createState() => _AppVersionUpdatePageState();
|
|
}
|
|
|
|
class _AppVersionUpdatePageState extends State<AppVersionUpdatePage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 350.w,
|
|
margin: EdgeInsets.symmetric(horizontal: 25.w),
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage("atu_images/general/at_icon_app_update_bg.png"),
|
|
fit: BoxFit.fill,
|
|
),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
SizedBox(height: 145.w),
|
|
text(
|
|
ATAppLocalizations.of(context)!.importantReminder,
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 17.sp,
|
|
textColor: Colors.black,
|
|
),
|
|
SizedBox(height: 15.w),
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(width: 15.w),
|
|
Expanded(
|
|
child: text(
|
|
ATAppLocalizations.of(
|
|
context,
|
|
)!.appUpdateTip("${widget.result.version}"),
|
|
fontSize: 14.sp,
|
|
maxLines: 5,
|
|
textColor: Colors.black54,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
SizedBox(width: 15.w),
|
|
],
|
|
),
|
|
SizedBox(height: 45.w),
|
|
Row(
|
|
children: [
|
|
SizedBox(width: 25.w),
|
|
widget.result.forceUpdate == true
|
|
? Container()
|
|
: GestureDetector(
|
|
child: Container(
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: Colors.transparent,
|
|
borderRadius: BorderRadius.circular(25.w),
|
|
border: Border.all(color: ChatVibeTheme.primaryColor, width: 1.w),
|
|
),
|
|
width: 85.w,
|
|
height: 40.w,
|
|
child: text(
|
|
ATAppLocalizations.of(context)!.skip2,
|
|
textColor: ChatVibeTheme.primaryColor,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 15.sp,
|
|
),
|
|
),
|
|
onTap: () {
|
|
SmartDialog.dismiss(tag: "showUpdateDialog");
|
|
},
|
|
),
|
|
widget.result.forceUpdate == true
|
|
? Container()
|
|
: SizedBox(width: 25.w),
|
|
Expanded(
|
|
child: GestureDetector(
|
|
child: Container(
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(25.w),
|
|
gradient: LinearGradient(
|
|
colors: [Color(0xffC670FF), Color(0xff7726FF)],
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
),
|
|
),
|
|
height: 40.w,
|
|
child: text(
|
|
ATAppLocalizations.of(context)!.updateNow,
|
|
textColor: Colors.white,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 15.sp,
|
|
),
|
|
),
|
|
onTap: () {
|
|
StoreRedirect.redirect();
|
|
},
|
|
),
|
|
),
|
|
SizedBox(width: 25.w),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|