Update section detail layout (display QRCode and beacon section when isMobile)
This commit is contained in:
parent
163ce71e38
commit
3186a0dd8e
@ -7,7 +7,7 @@ import 'dart:html' as html;
|
|||||||
|
|
||||||
class PDFHelper {
|
class PDFHelper {
|
||||||
static downloadPDF(List<SectionDTO> sections) async {
|
static downloadPDF(List<SectionDTO> sections) async {
|
||||||
var sectionsArticle = sections.where((section) => section.type == SectionType.Article);
|
var sectionsArticle = sections.where((section) => section.type == SectionType.Article || section.type == SectionType.Quizz); // TODO HERE Support more section types
|
||||||
if(sectionsArticle.length > 0) {
|
if(sectionsArticle.length > 0) {
|
||||||
//final font = await rootBundle.load("fonts/OpenSans-Medium.ttf");
|
//final font = await rootBundle.load("fonts/OpenSans-Medium.ttf");
|
||||||
//Uint8List byteData = new File("fonts/OpenSans-Medium.ttf").readAsBytesSync();
|
//Uint8List byteData = new File("fonts/OpenSans-Medium.ttf").readAsBytesSync();
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(sectionDTO != null ? sectionDTO.label : "", style: TextStyle(fontSize: 30, fontWeight: FontWeight.w400)),
|
Text(sectionDTO != null ? sectionDTO.label : "", style: TextStyle(fontSize: 30, fontWeight: FontWeight.w400)),
|
||||||
if(sectionDTO.type == SectionType.Article)
|
if((appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||||
DownloadPDF(sections: [sectionDTO]),
|
DownloadPDF(sections: [sectionDTO]),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -149,7 +149,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
if(sectionDTO.type == SectionType.Article)
|
if((appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||||
Column(
|
Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -222,7 +222,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
|||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
isTitle: true,
|
isTitle: true,
|
||||||
),
|
),
|
||||||
if(sectionDTO.type != SectionType.Article)
|
if(!(appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||||
MultiStringContainer(
|
MultiStringContainer(
|
||||||
label: "Description affichée:",
|
label: "Description affichée:",
|
||||||
modalLabel: "Description",
|
modalLabel: "Description",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user