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