Adapt layout for smaller screen
This commit is contained in:
parent
df07723ebd
commit
25f752539d
@ -1,12 +1,12 @@
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
audio_session=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/
|
||||
just_audio=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/
|
||||
just_audio_web=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio_web-0.4.7/
|
||||
path_provider=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/
|
||||
path_provider_android=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/
|
||||
path_provider_ios=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/
|
||||
path_provider_linux=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/
|
||||
path_provider_macos=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.7/
|
||||
path_provider_windows=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/
|
||||
qr_code_scanner=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/
|
||||
sqflite=/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/
|
||||
audio_session=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\audio_session-0.1.13\\
|
||||
just_audio=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\just_audio-0.9.31\\
|
||||
just_audio_web=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\just_audio_web-0.4.7\\
|
||||
path_provider=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider-2.0.11\\
|
||||
path_provider_android=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_android-2.0.22\\
|
||||
path_provider_ios=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_ios-2.0.11\\
|
||||
path_provider_linux=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.1.7\\
|
||||
path_provider_macos=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.7\\
|
||||
path_provider_windows=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.1.3\\
|
||||
qr_code_scanner=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\qr_code_scanner-1.0.1\\
|
||||
sqflite=C:\\Users\\thoma\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dartlang.org\\sqflite-2.2.3\\
|
||||
|
||||
@ -1 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_ios","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"android":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_android","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/qr_code_scanner-1.0.1/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","native_build":true,"dependencies":[]},{"name":"just_audio","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio-0.9.31/","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_macos","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.7/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.2.3/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]}],"web":[{"name":"audio_session","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audio_session-0.1.13/","dependencies":[]},{"name":"just_audio_web","path":"/Users/kiwixdevteam/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/just_audio_web-0.4.7/","dependencies":[]}]},"dependencyGraph":[{"name":"audio_session","dependencies":[]},{"name":"just_audio","dependencies":["just_audio_web","audio_session","path_provider"]},{"name":"just_audio_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2023-01-22 17:43:39.812446","version":"3.3.9"}
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_ios","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.11\\\\","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_android","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.22\\\\","native_build":true,"dependencies":[]},{"name":"qr_code_scanner","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\qr_code_scanner-1.0.1\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","native_build":true,"dependencies":[]},{"name":"just_audio","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio-0.9.31\\\\","native_build":true,"dependencies":["audio_session"]},{"name":"path_provider_macos","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.7\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\sqflite-2.2.3\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.7\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.1.3\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"audio_session","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\audio_session-0.1.13\\\\","dependencies":[]},{"name":"just_audio_web","path":"C:\\\\Users\\\\thoma\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dartlang.org\\\\just_audio_web-0.4.7\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"audio_session","dependencies":[]},{"name":"just_audio","dependencies":["just_audio_web","audio_session","path_provider"]},{"name":"just_audio_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"qr_code_scanner","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2023-01-22 20:14:50.014974","version":"3.3.10"}
|
||||
@ -18,18 +18,19 @@ void showImagePopup(ImageDTO imageDTO, ResourceModel resourceModel, AppContext a
|
||||
content: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
if(TranslationHelper.get(imageDTO.title, appContext).isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0, left:8.0, right: 8.0),
|
||||
padding: const EdgeInsets.only(top: 8.0, left:8.0, right: 8.0),
|
||||
child: Text(
|
||||
TranslationHelper.get(imageDTO.title, appContext),
|
||||
style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w400)),
|
||||
),
|
||||
SizedBox(
|
||||
height: size.height *0.3,
|
||||
width: size.width * 0.9,
|
||||
height: size.height * 0.5,
|
||||
width: size.width * 0.95,
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left:8.0, right: 8.0),
|
||||
padding: const EdgeInsets.only(left:8.0, right: 8.0, bottom: 8.0, top: 8.0),
|
||||
child: PhotoView(
|
||||
imageProvider: (appContext.getContext() as VisitAppContext).configuration!.isOffline! ?
|
||||
Image.memory(base64Decode(resourceModel.data!)).image :
|
||||
|
||||
@ -42,7 +42,10 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
final appContext = Provider.of<AppContext>(context);
|
||||
VisitAppContext visitAppContext = appContext.getContext() as VisitAppContext;
|
||||
Size size = MediaQuery.of(context).size;
|
||||
return Stack(
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -58,7 +61,7 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
currentIndex = index + 1;
|
||||
});
|
||||
},
|
||||
// height: widget.height * 0.95,
|
||||
height: widget.height * 0.86,
|
||||
enlargeCenterPage: true,
|
||||
reverse: false,
|
||||
),
|
||||
@ -66,14 +69,12 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
return Builder(
|
||||
builder: (BuildContext context) {
|
||||
//print(widget.imagesDTO[currentIndex-1]);
|
||||
return InkWell(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showImagePopup(widget.imagesDTO[currentIndex-1]!, i!, appContext, context, size);
|
||||
},
|
||||
child: Container(
|
||||
//color: Colors.red,
|
||||
//height: widget.height * 1,
|
||||
//width: size.width * 0.95,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
child: visitAppContext.configuration!.isOffline! ?
|
||||
@ -116,7 +117,7 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
),
|
||||
if(resourcesInWidget.length > 1)
|
||||
Positioned(
|
||||
top: widget.height * 0.45,
|
||||
top: widget.height * 0.4,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@ -131,7 +132,7 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
),
|
||||
if(resourcesInWidget.length > 1)
|
||||
Positioned(
|
||||
top: widget.height * 0.45,
|
||||
top: widget.height * 0.4,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
@ -146,25 +147,19 @@ class _SliderImagesWidget extends State<SliderImagesWidget> {
|
||||
),
|
||||
)
|
||||
),
|
||||
if(resourcesInWidget.isEmpty)
|
||||
const Center(child: Text("Aucune image à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect)))
|
||||
]
|
||||
),
|
||||
if(resourcesInWidget.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 0),
|
||||
child: Align(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
sliderController!.nextPage(duration: const Duration(milliseconds: 500), curve: Curves.fastOutSlowIn);
|
||||
},
|
||||
child: Text(
|
||||
currentIndex.toString()+'/'+resourcesInWidget.length.toString(),
|
||||
style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w500, color: kBlue2),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
if(resourcesInWidget.isEmpty)
|
||||
const Center(child: Text("Aucune image à afficher", style: TextStyle(fontSize: kNoneInfoOrIncorrect),))
|
||||
]
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -135,17 +135,19 @@ class _ConfigurationsListState extends State<ConfigurationsList> {
|
||||
alignment: Alignment.topLeft,
|
||||
child: Container(
|
||||
width: size.width*0.45,
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 45, left: 10),
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: AutoSizeText(
|
||||
TranslationHelper.get(configurations[index].title, appContext),
|
||||
style: const TextStyle(fontSize: kMenuTitleDetailSize),
|
||||
maxFontSize: 20,
|
||||
maxFontSize: 18,
|
||||
maxLines: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if(configurations[index].isOffline!)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user