misc update
This commit is contained in:
parent
077b373052
commit
19b715192a
@ -60,7 +60,7 @@ Faut pas oublier d'aller changer la version avant chaque upload de version (Puis
|
||||
2) Mettre à jour l'icone (dans pubspec.yaml ref icon)
|
||||
- flutter pub get
|
||||
- dart run flutter_launcher_icons
|
||||
3) Mettre à jour android manifest et info.plist
|
||||
3) Mettre à jour android manifest et info.plist (faire un CTRL MAJ F et replace..)
|
||||
- be.unov.myinfomate.mdlf
|
||||
- be.unov.mymuseum.fortsaintheribert
|
||||
4) Mettre à jour les couleurs de l'app
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="be.unov.myinfomate.mdlf">
|
||||
package="be.unov.mymuseum.fortsaintheribert">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package be.unov.myinfomate.mdlf
|
||||
package be.unov.mymuseum.fortsaintheribert
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="be.unov.myinfomate.mdlf">
|
||||
package="be.unov.mymuseum.fortsaintheribert">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
||||
@ -391,7 +391,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@ -527,7 +527,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
@ -555,7 +555,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.myinfomate.mdlf;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = be.unov.mymuseum.fortsaintheribert;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
|
||||
@ -30,6 +30,12 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
VisitAppContext visitAppContext = appContext.getContext();
|
||||
Size size = MediaQuery.of(context).size;
|
||||
|
||||
String cleanedTitle = widget.title.replaceAll('\n', ' ').replaceAll('<br>', ' ');
|
||||
|
||||
String formattedTitle = cleanedTitle.length > 35
|
||||
? cleanedTitle.substring(0, 35) + '...'
|
||||
: cleanedTitle;
|
||||
|
||||
//final notchInset = MediaQuery.of(context).padding;
|
||||
return AppBar(
|
||||
shadowColor: kMainColor1,
|
||||
@ -48,13 +54,16 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
},
|
||||
child: SizedBox(
|
||||
width: widget.isHomeButton ? size.width * 0.8 : null,
|
||||
child: HtmlWidget(
|
||||
widget.title,
|
||||
textStyle: const TextStyle(color: Colors.white),
|
||||
customStylesBuilder: (element)
|
||||
{
|
||||
return {'text-align': 'center', 'font-family': "Roboto", '-webkit-line-clamp': "2",};
|
||||
}
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: HtmlWidget(
|
||||
formattedTitle,
|
||||
textStyle: const TextStyle(color: Colors.white, fontFamily: 'Roboto', fontSize: 20),
|
||||
customStylesBuilder: (element)
|
||||
{
|
||||
return {'text-align': 'center', 'font-family': "Roboto", '-webkit-line-clamp': "2"};
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -108,7 +117,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
Color(0xFF7633B8),
|
||||
Color(0xFF6528B6),
|
||||
Color(0xFF6025B6)*/
|
||||
Color(0xFFf6b3c4),
|
||||
kMainColor0, //Color(0xFFf6b3c4)
|
||||
kMainColor1,
|
||||
kMainColor2,
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ class _SearchBoxState extends State<SearchBox> {
|
||||
icon: const Icon(Icons.search, color: Colors.white),
|
||||
hintText: TranslationHelper.getFromLocale("search", appContext.getContext()),
|
||||
hintStyle: const TextStyle(color: Colors.white),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 13.0),
|
||||
suffixIcon: _controller.value.text.isNotEmpty ? InkWell(
|
||||
onTap: () {
|
||||
if(_controller.value.text.isNotEmpty) {
|
||||
|
||||
23
lib/Components/fade_route.dart
Normal file
23
lib/Components/fade_route.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FadeRoute extends PageRouteBuilder {
|
||||
final Widget page;
|
||||
|
||||
FadeRoute({required this.page})
|
||||
: super(
|
||||
pageBuilder: (context, animation, secondaryAnimation) => page,
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
const begin = 0.0;
|
||||
const end = 1.0;
|
||||
const curve = Curves.easeInOut;
|
||||
|
||||
final tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
|
||||
final opacityAnimation = animation.drive(tween);
|
||||
|
||||
return FadeTransition(
|
||||
opacity: opacityAnimation,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -39,7 +39,7 @@ class _ArticlePageState extends State<ArticlePage> {
|
||||
List<ResourceModel?> resourcesModel = <ResourceModel?>[];
|
||||
ResourceModel? audioResourceModel;
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
late File audioFile;
|
||||
File? audioFile;
|
||||
late VisitAppContext visitAppContext;
|
||||
|
||||
@override
|
||||
@ -126,7 +126,7 @@ class _ArticlePageState extends State<ArticlePage> {
|
||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 0, top: 0), //size.height*0.1
|
||||
child: audioResourceModel != null && audioResourceModel!.source != null ? AudioPlayerFloatingContainer(file: audioFile, resourceURl: "", isAuto: articleDTO!.isReadAudioAuto!) : null,
|
||||
child: audioResourceModel != null && audioResourceModel!.source != null ? AudioPlayerFloatingContainer(file: audioFile, resourceURl: audioResourceModel!.source!, isAuto: articleDTO!.isReadAudioAuto!) : null,
|
||||
);
|
||||
}
|
||||
),
|
||||
|
||||
@ -126,7 +126,9 @@ class _AudioPlayerFloatingContainerState extends State<AudioPlayerFloatingContai
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
player.stop();
|
||||
if (player.playing) {
|
||||
player.stop();
|
||||
}
|
||||
player.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@ -346,15 +346,15 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
||||
|
||||
var result = await showDialog(
|
||||
builder: (BuildContext dialogContext) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.0))
|
||||
),
|
||||
content: Container(
|
||||
content: SizedBox(
|
||||
width: 400,
|
||||
height: 200,
|
||||
child: DownloadConfigurationWidget(configuration: configuration),
|
||||
),
|
||||
actions: <Widget>[],
|
||||
actions: const <Widget>[],
|
||||
), context: context
|
||||
);
|
||||
isDialogOpen = false;
|
||||
|
||||
@ -266,6 +266,40 @@ class _DownloadConfigurationWidgetState extends State<DownloadConfigurationWidge
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10.0),
|
||||
child: FutureBuilder(future: download(context, visitAppContext), builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
Color primaryColor = kMainColor1;
|
||||
return Center(child: CircularProgressIndicator(color: primaryColor));
|
||||
} else {
|
||||
return ValueListenableBuilder<int>(
|
||||
valueListenable: currentResourceNbr,
|
||||
builder: (context, valueNbr, _) {
|
||||
return ValueListenableBuilder<int>(
|
||||
valueListenable: currentResourceIndex,
|
||||
builder: (context, valueIndex, _) {
|
||||
return Center(
|
||||
child: Text(
|
||||
textAlign: TextAlign.center,
|
||||
valueIndex == valueNbr && valueNbr != -1 ? valueNbr == 0 ?
|
||||
TranslationHelper.getFromLocale(
|
||||
"upToDate",
|
||||
appContext.getContext()) : TranslationHelper.getFromLocale(
|
||||
"downloadFinish",
|
||||
appContext.getContext()) : TranslationHelper.getFromLocale(
|
||||
"downloadInProgress",
|
||||
appContext.getContext()),
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}),
|
||||
),
|
||||
ValueListenableBuilder<int>(
|
||||
valueListenable: currentResourceNbr,
|
||||
builder: (context, valueNbr, _) {
|
||||
@ -288,37 +322,6 @@ class _DownloadConfigurationWidgetState extends State<DownloadConfigurationWidge
|
||||
);
|
||||
}
|
||||
),
|
||||
FutureBuilder(future: download(context, visitAppContext), builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// Loader ou indicateur de chargement pendant la vérification
|
||||
Color primaryColor = kMainColor1;
|
||||
return Center(child: CircularProgressIndicator(color: primaryColor));
|
||||
} else {
|
||||
return ValueListenableBuilder<int>(
|
||||
valueListenable: currentResourceNbr,
|
||||
builder: (context, valueNbr, _) {
|
||||
return ValueListenableBuilder<int>(
|
||||
valueListenable: currentResourceIndex,
|
||||
builder: (context, valueIndex, _) {
|
||||
return Center(
|
||||
child: Text(
|
||||
valueIndex == valueNbr && valueNbr != -1 ? valueNbr == 0 ?
|
||||
TranslationHelper.getFromLocale(
|
||||
"upToDate",
|
||||
appContext.getContext()) : TranslationHelper.getFromLocale(
|
||||
"downloadFinish",
|
||||
appContext.getContext()) : TranslationHelper.getFromLocale(
|
||||
"downloadInProgress",
|
||||
appContext.getContext()),
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}),
|
||||
Spacer()
|
||||
],
|
||||
);
|
||||
|
||||
@ -30,9 +30,9 @@ const kTextRed = Color(0xFFba0505);
|
||||
const kBackgroundGrey = Color(0xFFb5b7b9);
|
||||
const kBackgroundSecondGrey = Color(0xFF5b5b63);
|
||||
|
||||
const kMainColor0 = Color(0xFFe52122); // const kBlue0 = Color(0xFF306bac);
|
||||
const kMainColor1 = Color(0xFFed7082); // const kBlue1 = Color(0xFF308aae);
|
||||
const kMainColor2 = Color(0xFFed7082); // const kBlue2 = Color(0xFF309cb0);
|
||||
const kMainColor0 = Color(0xFF306bac); // const kBlue0 = Color(0xFF306bac);
|
||||
const kMainColor1 = Color(0xFF308aae); // const kBlue1 = Color(0xFF308aae);
|
||||
const kMainColor2 = Color(0xFF309cb0); // const kBlue2 = Color(0xFF309cb0);
|
||||
|
||||
const kBackgroundLight = Color(0xfff3f3f3);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
set(BINARY_NAME "mymuseum_visitapp")
|
||||
set(APPLICATION_ID "be.unov.myinfomate.mdlf")
|
||||
set(APPLICATION_ID "be.unov.mymuseum.fortsaintheribert")
|
||||
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
|
||||
20
pubspec.lock
20
pubspec.lock
@ -361,18 +361,18 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_widget_from_html
|
||||
sha256: e79144d8a37b7d1075fc1fdebc32708bd142ad9fdf1c7d9444f5e964cc03158b
|
||||
sha256: "9e2a6201c4d2eb910b6b3ebb2a9f5c490fc61c9a1aa35eafdde38f0fc659cf4c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.1"
|
||||
version: "0.15.2"
|
||||
flutter_widget_from_html_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_widget_from_html_core
|
||||
sha256: df7c7c9e5ea144f7ab0adfbad733b4d4f7d408ab733c94e6e9fdcb327af92aa1
|
||||
sha256: b1048fd119a14762e2361bd057da608148a895477846d6149109b2151d2f7abf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.1"
|
||||
version: "0.15.2"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -409,18 +409,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fwfh_just_audio
|
||||
sha256: "4ff7927619ff4855567a61e126269e1fef985a9fe7e78682592da17bf658aabb"
|
||||
sha256: "38dc2c55803bd3cef33042c473e0c40b891ad4548078424641a32032f6a1245f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.1"
|
||||
version: "0.15.2"
|
||||
fwfh_svg:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fwfh_svg
|
||||
sha256: c6bb6b513f7ce2766aba76d7276caf9a96b6fee729ac3a492c366a42f82ef02e
|
||||
sha256: "550b1014d12b5528d8bdb6e3b44b58721f3fb1f65d7a852d1623a817008bdfc4"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.2"
|
||||
version: "0.8.3"
|
||||
fwfh_url_launcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -433,10 +433,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fwfh_webview
|
||||
sha256: "2cd2b1e463ddaf26b7d4f74e1a855126c4a836fdaff9551636693e07a07422b6"
|
||||
sha256: f67890bc0d6278da98bd197469ae9511c859f7db327e92299fe0ea0cf46c4057
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.1"
|
||||
version: "0.15.2"
|
||||
get:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@ -51,7 +51,7 @@ dependencies:
|
||||
get: ^4.6.6
|
||||
permission_handler: ^11.3.1
|
||||
diacritic: ^0.1.3
|
||||
flutter_widget_from_html: ^0.15.1
|
||||
flutter_widget_from_html: ^0.15.2
|
||||
|
||||
manager_api:
|
||||
path: manager_api
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user