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 {
|
||||
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) {
|
||||
//final font = await rootBundle.load("fonts/OpenSans-Medium.ttf");
|
||||
//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)),
|
||||
if(sectionDTO.type == SectionType.Article)
|
||||
if((appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||
DownloadPDF(sections: [sectionDTO]),
|
||||
],
|
||||
),
|
||||
@ -149,7 +149,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
if(sectionDTO.type == SectionType.Article)
|
||||
if((appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@ -222,7 +222,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
maxLines: 1,
|
||||
isTitle: true,
|
||||
),
|
||||
if(sectionDTO.type != SectionType.Article)
|
||||
if(!(appContext.getContext() as ManagerAppContext).selectedConfiguration.isMobile)
|
||||
MultiStringContainer(
|
||||
label: "Description affichée:",
|
||||
modalLabel: "Description",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user