@ -1,4 +1,6 @@
import ' package:carousel_slider/carousel_slider.dart ' ;
import ' package:diplomaticquarterapp/config/shared_pref_kay.dart ' ;
import ' package:diplomaticquarterapp/core/model/ImagesInfo.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/pages/login/login-type.dart ' ;
import ' package:diplomaticquarterapp/routes.dart ' ;
@ -12,12 +14,22 @@ import 'package:provider/provider.dart';
import ' ../../splashPage.dart ' ;
class NotAutPage extends State less Widget {
class NotAutPage extends State fu lWidget {
final String title ;
final String description ;
final List < String > infoList ;
final List < ImagesInfo > imagesInfo ;
NotAutPage ( { @ required this . title , @ required this . description , this . infoList , this . imagesInfo } ) ;
@ override
_NotAutPageState createState ( ) = > _NotAutPageState ( ) ;
}
class _NotAutPageState extends State < NotAutPage > {
int _current = 0 ;
NotAutPage ( { @ required this . title , @ required this . description , this . infoList } ) ;
@ override
Widget build ( BuildContext context ) {
@ -29,7 +41,7 @@ class NotAutPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Texts (
title ? ? ' Service ' ,
widget. title ? ? ' Service ' ,
fontWeight: FontWeight . w800 ,
fontSize: 25 ,
bold: true ,
@ -40,17 +52,17 @@ class NotAutPage extends StatelessWidget {
height: 12 ,
) ,
Texts (
description ? ? ' Description ' ,
widget. description ? ? ' Description ' ,
fontWeight: FontWeight . normal ,
fontSize: 17 ,
) ,
if ( infoList ! = null )
if ( widget. infoList ! = null )
SizedBox (
height: 12 ,
) ,
if ( infoList ! = null )
if ( widget. infoList ! = null )
. . . List . generate (
infoList. length ,
widget. infoList. length ,
( index ) = > Container (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
@ -69,7 +81,7 @@ class NotAutPage extends StatelessWidget {
) ,
) ,
SizedBox ( width: 6 , ) ,
Expanded ( child: Texts ( ' ${ infoList[ index ] } ' ) )
Expanded ( child: Texts ( ' ${ widget. infoList[ index ] } ' ) )
] ,
) ,
SizedBox ( height: 12 , ) ,
@ -80,6 +92,7 @@ class NotAutPage extends StatelessWidget {
SizedBox (
height: 22 ,
) ,
if ( ! projectViewModel . isInternetConnection )
Center (
child: SizedBox (
height: MediaQuery . of ( context ) . size . height * 0.55 ,
@ -89,6 +102,24 @@ class NotAutPage extends StatelessWidget {
: ' assets/images/wifi-EN.png ' ) ,
) ,
) ,
if ( projectViewModel . isInternetConnection & & widget . imagesInfo ! = null )
CarouselSlider (
items: widget . imagesInfo . map ( ( image ) {
return Builder (
builder: ( BuildContext context ) {
return SizedBox (
width: MediaQuery . of ( context ) . size . width * 0.50 ,
child: Image . network ( projectViewModel . isArabic ? image . imageAr : image . imageEn ) ) ;
} ,
) ;
} ) . toList ( ) ,
options: CarouselOptions (
height: MediaQuery . of ( context ) . size . height * 0.55 ,
autoPlay: true ,
viewportFraction: 1.0 ,
) ,
) ,
SizedBox (
height: 77 ,
) ,