forked from eatvio/eatvio_app
112 lines
4.6 KiB
Dart
112 lines
4.6 KiB
Dart
import 'dart:io';
|
||
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||
import 'package:flutter_svg/flutter_svg.dart';
|
||
import 'package:url_launcher/url_launcher.dart';
|
||
|
||
import '../../../../core/theme/theme_helper.dart';
|
||
|
||
class UpdateScreen extends StatelessWidget {
|
||
const UpdateScreen({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
FlutterNativeSplash.remove();
|
||
return Scaffold(
|
||
body: Stack(
|
||
clipBehavior: Clip.none,
|
||
children: [
|
||
Positioned(
|
||
left: -20,
|
||
top: -20,
|
||
right: -20,
|
||
bottom: -20,
|
||
child: Image.asset(
|
||
'assets/images/bg_welcome.png',
|
||
fit: BoxFit.cover,
|
||
),
|
||
),
|
||
Positioned.fill(
|
||
child: SafeArea(
|
||
child: Padding(
|
||
padding: const EdgeInsets.only(bottom: 16),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.center,
|
||
children: [
|
||
const SizedBox(height: 80),
|
||
SvgPicture.asset('assets/images/logo_welcome.svg'),
|
||
const Spacer(),
|
||
Padding(
|
||
padding: const EdgeInsets.all(16),
|
||
child: Material(
|
||
borderRadius: BorderRadius.circular(14),
|
||
color: Colors.white,
|
||
child: Padding(
|
||
padding: const EdgeInsets.all(16),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
const SizedBox(height: 16),
|
||
const Text(
|
||
'Пора обновиться! ⚡',
|
||
style: TextStyle(
|
||
fontSize: 28,
|
||
fontWeight: FontWeight.w800,
|
||
height: 1,
|
||
),
|
||
),
|
||
const SizedBox(height: 20),
|
||
const Text(
|
||
'Мы выпустили важное обновление\nс новыми функциями и исправлениями.\nЧтобы продолжить пользоваться\nприложением без сбоев, обновите\nего прямо сейчас.',
|
||
style: TextStyle(
|
||
fontSize: 16,
|
||
fontWeight: FontWeight.w500,
|
||
height: 1.15,
|
||
),
|
||
),
|
||
const SizedBox(height: 32),
|
||
InkWell(
|
||
onTap: () async {
|
||
final Uri url = Platform.isAndroid
|
||
? Uri.parse('https://www.rustore.ru/catalog/app/com.eatvioapp.app')
|
||
: Uri.parse('https://apps.apple.com/app/idYOUR_APP_ID');
|
||
await launchUrl(url);
|
||
},
|
||
borderRadius: BorderRadius.circular(8),
|
||
child: Ink(
|
||
height: 52,
|
||
decoration: BoxDecoration(
|
||
color: appTheme.blueA400,
|
||
borderRadius: BorderRadius.circular(8),
|
||
),
|
||
child: const Center(
|
||
child: Text(
|
||
'Обновить',
|
||
style: TextStyle(
|
||
fontSize: 16,
|
||
fontWeight: FontWeight.w600,
|
||
height: 1,
|
||
color: Colors.white,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
),
|
||
const SizedBox(height: 16),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
}
|