Fix language selection (update to png) + update all text to HtmlWidget

This commit is contained in:
Thomas Fransolet 2023-11-02 17:45:57 +01:00
parent 87f1443f0c
commit f45497d476
18 changed files with 107 additions and 46 deletions

BIN
assets/images/old/ar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
assets/images/old/cn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 225 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/images/old/es.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

BIN
assets/images/old/it.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

View File

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 219 B

BIN
assets/images/old/pl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

BIN
assets/images/old/uk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

View File

@ -4,11 +4,11 @@ import 'package:provider/provider.dart';
import 'package:tablet_app/Models/tabletContext.dart'; import 'package:tablet_app/Models/tabletContext.dart';
import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/app_context.dart';
import 'package:tablet_app/constants.dart'; import 'package:tablet_app/constants.dart';
import 'package:flutter_svg_provider/flutter_svg_provider.dart';
import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter/webview_flutter.dart';
class LanguageSelection extends StatefulWidget { class LanguageSelection extends StatefulWidget {
LanguageSelection(); LanguageSelection({required this.size});
Size size;
@override @override
_LanguageSelection createState() => _LanguageSelection(); _LanguageSelection createState() => _LanguageSelection();
@ -16,8 +16,6 @@ class LanguageSelection extends StatefulWidget {
class _LanguageSelection extends State<LanguageSelection> with TickerProviderStateMixin { class _LanguageSelection extends State<LanguageSelection> with TickerProviderStateMixin {
List<String>? languagesEnable; List<String>? languagesEnable;
Size sizeScreen = new Size(1080.0, 1920.0); // Tablet resolution
double flagSize = 60; double flagSize = 60;
String? selectedLanguage; String? selectedLanguage;
@ -33,10 +31,10 @@ class _LanguageSelection extends State<LanguageSelection> with TickerProviderSta
@override @override
void initState() { void initState() {
setState(() { setState(() {
_leftLanguage = kIsWeb ? sizeScreen.width - (sizeScreen.width *0.07) : sizeScreen.width - (sizeScreen.width *0.07); //size.width - size.width *0.07; _leftLanguage = kIsWeb ? widget.size.width - (widget.size.width *0.07) : widget.size.width - (widget.size.width *0.07); //size.width - size.width *0.07;
_topLanguage = kIsWeb ? sizeScreen.height * 0.07 : sizeScreen.height * 0.075; _topLanguage = kIsWeb ? widget.size.height * 0.06 : widget.size.height * 0.1;
_rightLanguage = 0; _rightLanguage = 0;
_bottomLanguage = minimized ? (kIsWeb ? sizeScreen.height*0.8 : sizeScreen.height*0.6) : (kIsWeb ? sizeScreen.height - (sizeScreen.height *0.45) : sizeScreen.height - (sizeScreen.height *0.07)); _bottomLanguage = minimized ? (kIsWeb ? widget.size.height*0.2 : widget.size.height*0.15) : (kIsWeb ? widget.size.height - (widget.size.height *0.07) : widget.size.height - (widget.size.height *0.07));
}); });
_controller = AnimationController( _controller = AnimationController(
@ -102,8 +100,8 @@ class _LanguageSelection extends State<LanguageSelection> with TickerProviderSta
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
width: sizeScreen.height *0.07, width: 75,
height: kIsWeb ? sizeScreen.height *0.015 : sizeScreen.width *0.07, height: 75,
decoration: flagDecoration(language), decoration: flagDecoration(language),
), ),
), ),
@ -126,9 +124,9 @@ class _LanguageSelection extends State<LanguageSelection> with TickerProviderSta
} }
setState(() { setState(() {
_leftLanguage = kIsWeb ? size.width - (size.width *0.07) : size.width - (size.width *0.07); //size.width - size.width *0.07; _leftLanguage = kIsWeb ? size.width - (size.width *0.07) : size.width - (size.width *0.07); //size.width - size.width *0.07;
_topLanguage = kIsWeb ? sizeScreen.height * 0.06 : sizeScreen.height * 0.07; _topLanguage = kIsWeb ? size.height * 0.06 : size.height * 0.1;
_rightLanguage = 0; _rightLanguage = 0;
_bottomLanguage = minimized ? (kIsWeb ? size.height*0.2 : size.height*0.6) : (kIsWeb ? size.height - (size.height *0.07) : size.height - (size.height *0.07)); _bottomLanguage = minimized ? (kIsWeb ? size.height*0.2 : size.height*0.15) : (kIsWeb ? size.height - (size.height *0.07) : size.height - (size.height *0.07));
}); });
} }
@ -139,9 +137,7 @@ class _LanguageSelection extends State<LanguageSelection> with TickerProviderSta
//border: Border.all(width: 1.5, color: kSecondGrey), //border: Border.all(width: 1.5, color: kSecondGrey),
image: DecorationImage( image: DecorationImage(
fit: BoxFit.contain, fit: BoxFit.contain,
image: Svg( image: AssetImage("assets/images/old/"+language.toLowerCase()+".png"),
"assets/images/"+language.toLowerCase()+".svg",
), //AssetImage("assets/images/"+language+".png"),
), ),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(

View File

@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/Components/loading.dart'; import 'package:tablet_app/Components/loading.dart';
@ -18,7 +19,6 @@ import 'package:tablet_app/Screens/Video/video_view.dart';
import 'package:tablet_app/Screens/Web/web_view.dart'; import 'package:tablet_app/Screens/Web/web_view.dart';
import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/app_context.dart';
import 'package:tablet_app/constants.dart'; import 'package:tablet_app/constants.dart';
import 'package:auto_size_text/auto_size_text.dart';
import '../Quizz/quizz_view.dart'; import '../Quizz/quizz_view.dart';
import 'language_selection.dart'; import 'language_selection.dart';
@ -94,7 +94,7 @@ class _MainViewWidget extends State<MainViewWidget> {
decoration: configurationDTO.imageId != null ? BoxDecoration( decoration: configurationDTO.imageId != null ? BoxDecoration(
image: new DecorationImage( image: new DecorationImage(
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(Colors.grey.withOpacity(0.7), BlendMode.color), colorFilter: new ColorFilter.mode(Colors.white.withOpacity(0.8), BlendMode.lighten),
image: new NetworkImage( image: new NetworkImage(
configurationDTO.imageSource!, configurationDTO.imageSource!,
), ),
@ -130,22 +130,20 @@ class _MainViewWidget extends State<MainViewWidget> {
Expanded( Expanded(
child: Align( child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: AutoSizeText( child: HtmlWidget(
sectionSelected!.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, sectionSelected!.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
style: new TextStyle(fontSize: kIsWeb ? kWebSectionTitleDetailSize : kSectionTitleDetailSize), textStyle: new TextStyle(fontSize: kIsWeb ? kWebSectionTitleDetailSize : kSectionTitleDetailSize),
maxLines: 1, )
),
) )
), ),
if(sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null && sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!.trim().isNotEmpty) if(sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null && sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!.trim().isNotEmpty)
Expanded( Expanded(
child: Align( child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: AutoSizeText( child: HtmlWidget(
sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, sectionSelected!.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize), textStyle: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize : kSectionDescriptionDetailSize),
maxLines: 2, )
),
) )
) )
], ],
@ -213,7 +211,7 @@ class _MainViewWidget extends State<MainViewWidget> {
decoration: configurationDTO.imageId != null ? BoxDecoration( decoration: configurationDTO.imageId != null ? BoxDecoration(
image: new DecorationImage( image: new DecorationImage(
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: new ColorFilter.mode(Colors.grey.withOpacity(0.7), BlendMode.color), colorFilter: new ColorFilter.mode(Colors.grey.withOpacity(0.1), BlendMode.color),
image: new NetworkImage( image: new NetworkImage(
configurationDTO.imageSource!, configurationDTO.imageSource!,
), ),
@ -221,7 +219,7 @@ class _MainViewWidget extends State<MainViewWidget> {
) : null, ) : null,
child: Stack( child: Stack(
children: [ children: [
if (configurationDTO != null) LanguageSelection(), LanguageSelection(size: size),
Center( Center(
child: Container( child: Container(
height: kIsWeb ? size.height : size.height * 0.85, height: kIsWeb ? size.height : size.height * 0.85,
@ -259,18 +257,22 @@ class _MainViewWidget extends State<MainViewWidget> {
children: [ children: [
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AutoSizeText( child: HtmlWidget(
snapshot.data[index].title.firstWhere((translation) => translation.language == appContext.getContext().language).value, snapshot.data[index].title.firstWhere((translation) => translation.language == appContext.getContext().language).value,
style: new TextStyle(fontSize: kIsWeb ? kWebMenuTitleDetailSize: kMenuTitleDetailSize), customStylesBuilder: (element) {
maxLines: 1, return {'text-align': 'right'};
},
textStyle: new TextStyle(fontSize: kIsWeb ? kWebMenuTitleDetailSize: kMenuTitleDetailSize),
), ),
), ),
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AutoSizeText( child: HtmlWidget(
snapshot.data[index].description.firstWhere((translation) => translation.language == appContext.getContext().language).value, snapshot.data[index].description.firstWhere((translation) => translation.language == appContext.getContext().language).value,
style: new TextStyle(fontSize: kIsWeb ? kWebMenuDescriptionDetailSize: kMenuDescriptionDetailSize, fontFamily: ""), customStylesBuilder: (element) {
maxLines: 1, return {'text-align': 'right'};
},
textStyle: new TextStyle(fontSize: kIsWeb ? kWebMenuDescriptionDetailSize: kMenuDescriptionDetailSize, fontFamily: ""),
), ),
), ),
], ],

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/Models/map-marker.dart'; import 'package:tablet_app/Models/map-marker.dart';
@ -165,18 +166,22 @@ class _MenuViewWidget extends State<MenuViewWidget> {
children: [ children: [
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AutoSizeText( child: HtmlWidget(
menuDTO.sections![index].title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, menuDTO.sections![index].title!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
style: new TextStyle(fontSize: kIsWeb? kWebMenuTitleDetailSize : kMenuTitleDetailSize), customStylesBuilder: (element) {
maxLines: 1, return {'text-align': 'right'};
},
textStyle: new TextStyle(fontSize: kIsWeb? kWebMenuTitleDetailSize : kMenuTitleDetailSize),
), ),
), ),
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: AutoSizeText( child: HtmlWidget(
menuDTO.sections![index].description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!, menuDTO.sections![index].description!.firstWhere((translation) => translation.language == appContext.getContext().language).value!,
style: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize: kSectionDescriptionDetailSize, fontFamily: ""), customStylesBuilder: (element) {
maxLines: 1, return {'text-align': 'right'};
},
textStyle: new TextStyle(fontSize: kIsWeb? kWebSectionDescriptionDetailSize: kSectionDescriptionDetailSize, fontFamily: ""),
), ),
), ),
], ],

View File

@ -5,6 +5,7 @@ import 'package:confetti/confetti.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/Components/Buttons/rounded_button.dart'; import 'package:tablet_app/Components/Buttons/rounded_button.dart';
@ -178,7 +179,15 @@ class _QuizzViewWidget extends State<QuizzViewWidget> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: levelToShow != null ? Text(levelToShow.label.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? levelToShow.label.firstWhere((translation) => translation.language == appContext.getContext().language).value : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize)): Text("No data"), child: levelToShow != null ?
HtmlWidget(
levelToShow.label.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? levelToShow.label.firstWhere((translation) => translation.language == appContext.getContext().language).value : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
)
: Text("No data"),
), ),
), ),
), ),
@ -342,7 +351,13 @@ class _QuizzViewWidget extends State<QuizzViewWidget> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Text(i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize)), child: HtmlWidget(
i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
),
), ),
), ),
), ),
@ -390,7 +405,13 @@ class _QuizzViewWidget extends State<QuizzViewWidget> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize, color: i.chosen == index ? Colors.white : Colors.black)), child: HtmlWidget(
i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize, color: i.chosen == index ? Colors.white : Colors.black),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: i.chosen == index ? kTestSecondColor : kBackgroundLight, color: i.chosen == index ? kTestSecondColor : kBackgroundLight,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,

View File

@ -4,6 +4,7 @@ import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/Models/ResponseSubDTO.dart'; import 'package:tablet_app/Models/ResponseSubDTO.dart';
@ -124,7 +125,13 @@ class _ShowReponsesWidget extends State<ShowReponsesWidget> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(1.0), padding: const EdgeInsets.all(1.0),
child: Text(i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize)), child: HtmlWidget(
i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
),
), ),
), ),
), ),
@ -156,7 +163,13 @@ class _ShowReponsesWidget extends State<ShowReponsesWidget> {
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize, color: i.chosen == index ? Colors.white : Colors.black)), child: HtmlWidget(
i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.responsesSubDTO![index].label!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize, color: i.chosen == index ? Colors.white : Colors.black),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: i.responsesSubDTO![index].isGood! ? kGreen : i.chosen == index ? kMainRed : kBackgroundLight, color: i.responsesSubDTO![index].isGood! ? kGreen : i.chosen == index ? kMainRed : kBackgroundLight,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,

View File

@ -3,6 +3,7 @@ import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:manager_api/api.dart'; import 'package:manager_api/api.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:tablet_app/app_context.dart'; import 'package:tablet_app/app_context.dart';
@ -136,7 +137,10 @@ class _SliderViewWidget extends State<SliderViewWidget> {
right: 0, right: 0,
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Text(i.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebTitleSize : kTitleSize, color: kBackgroundLight)), child: HtmlWidget(
i.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.title!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebTitleSize : kTitleSize, color: kBackgroundLight),
),
) )
) )
] ]
@ -165,7 +169,13 @@ class _SliderViewWidget extends State<SliderViewWidget> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Text(i.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "", textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize)), child: HtmlWidget(
i.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value != null ? i.description!.firstWhere((translation) => translation.language == appContext.getContext().language).value! : "",
textStyle: TextStyle(fontSize: kIsWeb ? kWebDescriptionSize : kDescriptionSize),
customStylesBuilder: (element) {
return {'text-align': 'center'};
},
),
), ),
), ),
), ),

View File

@ -5,10 +5,22 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import audio_session
import just_audio
import package_info_plus
import path_provider_foundation
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
import video_player_avfoundation
import wakelock_plus
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin"))
} }

View File

@ -46,7 +46,8 @@ dependencies:
photo_view: ^0.14.0 photo_view: ^0.14.0
confetti: ^0.7.0 confetti: ^0.7.0
flutter_launcher_icons: ^0.13.1 # All but web flutter_launcher_icons: ^0.13.1 # All but web
flutter_svg_provider: ^1.0.6 #flutter_svg_provider: ^1.0.6
flutter_widget_from_html: ^0.10.1
openapi_generator_cli: ^4.13.1 openapi_generator_cli: ^4.13.1
openapi_generator: ^4.13.1 openapi_generator: ^4.13.1
@ -82,6 +83,7 @@ flutter:
assets: assets:
- assets/icons/ - assets/icons/
- assets/images/ - assets/images/
- assets/images/old/
- assets/animations/ - assets/animations/
# - assets/files/ # - assets/files/
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg