diff --git a/lib/Screens/MainView/language_selection.dart b/lib/Screens/MainView/language_selection.dart index cf3e03e..789bb0d 100644 --- a/lib/Screens/MainView/language_selection.dart +++ b/lib/Screens/MainView/language_selection.dart @@ -13,6 +13,7 @@ class LanguageSelection extends StatefulWidget { } class _LanguageSelection extends State with TickerProviderStateMixin { + List languagesEnable; Size sizeScreen = new Size(1080.0, 1920.0); // Tablet resolution double flagSize = 60; @@ -54,6 +55,7 @@ class _LanguageSelection extends State with TickerProviderSta final appContext = Provider.of(context); Size size = MediaQuery.of(context).size; selectedLanguage = (appContext.getContext() as TabletAppContext).language; + languagesEnable = (appContext.getContext() as TabletAppContext).configuration.languages; return Stack( children: [ @@ -86,7 +88,7 @@ class _LanguageSelection extends State with TickerProviderSta ListView( children: [ if(minimized) ... [ - for(var language in languages.where((element) => element.toUpperCase() != selectedLanguage )) + for(var language in languagesEnable.where((element) => element.toUpperCase() != selectedLanguage )) InkWell( onTap: () { setState(() { diff --git a/lib/Screens/MainView/main_view.dart b/lib/Screens/MainView/main_view.dart index 0923b14..8595137 100644 --- a/lib/Screens/MainView/main_view.dart +++ b/lib/Screens/MainView/main_view.dart @@ -69,83 +69,85 @@ class _MainViewWidget extends State { break; } return Scaffold( - body: Column( - children: [ - Container( - width: size.width, - height: size.height * 0.12, - child: Row( - children: [ - Padding( - padding: const EdgeInsets.only(left: 15.0, top: 10.0), - child: AspectRatio( - aspectRatio: 4 / 4, - child: Container( - /*width: 125, - height: 125,*/ - decoration: boxDecoration(sectionSelected), + body: SingleChildScrollView( + child: Column( + children: [ + Container( + width: size.width, + height: size.height * 0.12, + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 15.0, top: 10.0), + child: AspectRatio( + aspectRatio: 4 / 4, + child: Container( + /*width: 125, + height: 125,*/ + decoration: boxDecoration(sectionSelected), + ), ), ), - ), - SizedBox( - width: 25, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: Align( - alignment: Alignment.centerLeft, - child: AutoSizeText( - sectionSelected.title.firstWhere((translation) => translation.language == appContext.getContext().language).value, - style: new TextStyle(fontSize: 25), - maxLines: 1, - ), - ) - ), - Expanded( - child: Align( - alignment: Alignment.centerLeft, - child: AutoSizeText( - sectionSelected.description.firstWhere((translation) => translation.language == appContext.getContext().language).value, - style: new TextStyle(fontSize: 20), - maxLines: 2, - ), - ) - ) - ], - ), - ) - ], - ), - ), - Padding( - padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0), - child: Container( - width: size.width, - height: size.height * 0.85, - decoration: sectionSelected.type != SectionType.video && sectionSelected.type != SectionType.web ? BoxDecoration( - color: kBackgroundLight, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(30.0), - boxShadow: [ - BoxShadow( - color: kBackgroundSecondGrey, - spreadRadius: 0.5, - blurRadius: 5, - offset: Offset(0, 1.5), // changes position of shadow + SizedBox( + width: 25, ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Align( + alignment: Alignment.centerLeft, + child: AutoSizeText( + sectionSelected.title.firstWhere((translation) => translation.language == appContext.getContext().language).value, + style: new TextStyle(fontSize: 25), + maxLines: 1, + ), + ) + ), + Expanded( + child: Align( + alignment: Alignment.centerLeft, + child: AutoSizeText( + sectionSelected.description.firstWhere((translation) => translation.language == appContext.getContext().language).value, + style: new TextStyle(fontSize: 20), + maxLines: 2, + ), + ) + ) + ], + ), + ) ], - ) : null, - child: Padding( - padding: const EdgeInsets.all(0.0), - child: elementToShow), + ), ), - ) - ], + Padding( + padding: const EdgeInsets.only(left: 15.0, right: 15.0, top: 15.0), + child: Container( + width: size.width, + height: size.height * 0.85, + decoration: sectionSelected.type != SectionType.video && sectionSelected.type != SectionType.web ? BoxDecoration( + color: kBackgroundLight, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(30.0), + boxShadow: [ + BoxShadow( + color: kBackgroundSecondGrey, + spreadRadius: 0.5, + blurRadius: 5, + offset: Offset(0, 1.5), // changes position of shadow + ), + ], + ) : null, + child: Padding( + padding: const EdgeInsets.all(0.0), + child: elementToShow), + ), + ) + ], + ), ), floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, floatingActionButton: Container(