Add isMobile for number sections
This commit is contained in:
parent
407fe28ead
commit
6429ea0ad8
@ -10,6 +10,7 @@ class ListViewCardSections extends StatefulWidget {
|
||||
final int index;
|
||||
final Key key;
|
||||
final List<SectionDTO> sections;
|
||||
final bool isMobile;
|
||||
final AppContext appContext;
|
||||
final Function onSelect;
|
||||
//final ValueChanged<List<ImageGeoPoint>> onChanged;
|
||||
@ -18,6 +19,7 @@ class ListViewCardSections extends StatefulWidget {
|
||||
this.sections,
|
||||
this.index,
|
||||
this.key,
|
||||
this.isMobile,
|
||||
this.appContext,
|
||||
this.onSelect
|
||||
);
|
||||
@ -39,20 +41,20 @@ class _ListViewCardSectionsState extends State<ListViewCardSections> {
|
||||
},
|
||||
child: Center(
|
||||
//padding: const EdgeInsets.only(right: 30.0),
|
||||
child: getElement(widget.index, widget.sections[widget.index], size, appContext)
|
||||
child: getElement(widget.index, widget.sections[widget.index], size, widget.isMobile, appContext)
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getElement(int index, SectionDTO sectionDTO, Size size, AppContext appContext) {
|
||||
getElement(int index, SectionDTO sectionDTO, Size size, bool isMobile, AppContext appContext) {
|
||||
return Container(
|
||||
width: 150,
|
||||
height: 150,
|
||||
decoration: boxDecoration(sectionDTO, appContext),
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
isMobile ? Align(
|
||||
alignment: Alignment.bottomLeft,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@ -71,7 +73,7 @@ class _ListViewCardSectionsState extends State<ListViewCardSections> {
|
||||
style: const TextStyle(color: Colors.white)
|
||||
),
|
||||
),
|
||||
),
|
||||
): SizedBox(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
child: Align(
|
||||
|
||||
@ -79,6 +79,7 @@ class _SectionReorderListState extends State<SectionReorderList> {
|
||||
sections,
|
||||
index,
|
||||
Key('$index'),
|
||||
currentConfiguration.isMobile,
|
||||
appContext,
|
||||
(section) {
|
||||
setState(() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user