You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Dart
		
	
		
		
			
		
	
	
			81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Dart
		
	
| 
								 
											4 years ago
										 
									 | 
							
								// @dart=2.9
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								import 'dart:io' show Platform;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								import 'package:flutter/cupertino.dart';
							 | 
						||
| 
								 | 
							
								import 'package:flutter/material.dart';
							 | 
						||
| 
								 | 
							
								import 'package:url_launcher/url_launcher.dart';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class UpdatePage extends StatelessWidget {
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  final String message;
							 | 
						||
| 
								 | 
							
								  final String androidLink;
							 | 
						||
| 
								 | 
							
								  final String iosLink;
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								  const UpdatePage({Key key, this.message, this.androidLink, this.iosLink})
							 | 
						||
| 
								 | 
							
								      : super(key: key);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								  @override
							 | 
						||
| 
								 | 
							
								  Widget build(BuildContext context) {
							 | 
						||
| 
								 | 
							
								    return SafeArea(
							 | 
						||
| 
								 | 
							
								      child: AppScaffold(
							 | 
						||
| 
								 | 
							
								        isShowAppBar: false,
							 | 
						||
| 
								 | 
							
								        backgroundColor: Colors.white,
							 | 
						||
| 
								 | 
							
								        body: SingleChildScrollView(
							 | 
						||
| 
								 | 
							
								          physics: BouncingScrollPhysics(),
							 | 
						||
| 
								 | 
							
								          child: Column(
							 | 
						||
| 
								 | 
							
								            crossAxisAlignment: CrossAxisAlignment.center,
							 | 
						||
| 
								 | 
							
								            children: [
							 | 
						||
| 
								 | 
							
								              Image.asset(
							 | 
						||
| 
								 | 
							
								                'assets/images/update_rocket_image.png',
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								                width: double.maxFinite,
							 | 
						||
| 
								 | 
							
								                fit: BoxFit.fill,
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								              ),
							 | 
						||
| 
								 | 
							
								              Image.asset('assets/images/HMG_logo.png'),
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								              SizedBox(
							 | 
						||
| 
								 | 
							
								                height: 8,
							 | 
						||
| 
								 | 
							
								              ),
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								              AppText(
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								                TranslationBase.of(context).updateTheApp.toUpperCase(),
							 | 
						||
| 
								 | 
							
								                fontSize: 17,
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								                fontWeight: FontWeight.w600,
							 | 
						||
| 
								 | 
							
								              ),
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								              SizedBox(
							 | 
						||
| 
								 | 
							
								                height: 12,
							 | 
						||
| 
								 | 
							
								              ),
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								              Padding(
							 | 
						||
| 
								 | 
							
								                padding: const EdgeInsets.all(8.0),
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								                child: AppText(
							 | 
						||
| 
								 | 
							
								                  message ?? "Update the app",
							 | 
						||
| 
								 | 
							
								                  fontSize: 12,
							 | 
						||
| 
								 | 
							
								                ),
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								              )
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								            ],
							 | 
						||
| 
								 | 
							
								          ),
							 | 
						||
| 
								 | 
							
								        ),
							 | 
						||
| 
								 | 
							
								        bottomSheet: Container(
							 | 
						||
| 
								 | 
							
								          height: 80,
							 | 
						||
| 
								 | 
							
								          child: Container(
							 | 
						||
| 
								 | 
							
								            // padding: const EdgeInsets.all(8.0),
							 | 
						||
| 
								 | 
							
								            margin: EdgeInsets.all(15),
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								            child: AppButton(
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								              color: Colors.red[800],
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								              onPressed: () {
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								                if (Platform.isIOS)
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								                  launch(iosLink);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								                else
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								                  launch(androidLink);
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								              },
							 | 
						||
| 
								 
											4 years ago
										 
									 | 
							
								              title: TranslationBase.of(context).updateNow.toUpperCase(),
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								            ),
							 | 
						||
| 
								 | 
							
								          ),
							 | 
						||
| 
								 | 
							
								        ),
							 | 
						||
| 
								 | 
							
								      ),
							 | 
						||
| 
								 | 
							
								    );
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								}
							 |