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.
diplomatic-quarter/lib/widgets/others/not_auh_page.dart

113 lines
3.9 KiB
Dart

import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class NotAutPage extends StatelessWidget {
final String title;
final String description;
final List<String> infoList;
NotAutPage({@required this.title, @required this.description, this.infoList});
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
title ?? 'Service',
fontWeight: FontWeight.w800,
fontSize: 25,
bold: true,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
description ?? 'Description',
fontWeight: FontWeight.normal,
fontSize: 17,
),
if (infoList != null)
SizedBox(
height: 12,
),
if (infoList != null)
...List.generate(
infoList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
// shape: BoxShape.circle,
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).primaryColor),
child: Center(
child: Texts('${index+1}',color: Colors.white,),
),
),
SizedBox(width: 6,),
Expanded(child: Texts('${infoList[index]}'))
],
),
SizedBox(height: 12,),
],
),
),
),
SizedBox(
height: 22,
),
Center(
child: SizedBox(
height: MediaQuery.of(context).size.height * 0.55,
width: MediaQuery.of(context).size.width * 0.50,
child: Image.asset(projectViewModel.isArabic
? 'assets/images/Wifi-AR.png'
: 'assets/images/wifi-EN.png'),
),
),
SizedBox(
height: 77,
),
],
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.pushReplacement(
context, FadePage(page: LoginType())),
label: TranslationBase.of(context).serviceInformationButton,
textColor: Theme.of(context).backgroundColor),
),
],
),
),
);
}
}