backup.
This commit is contained in:
122
lib/widgets/mobile/mobile_index_main_content_3.dart
Normal file
122
lib/widgets/mobile/mobile_index_main_content_3.dart
Normal file
@@ -0,0 +1,122 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/generated/l10n.dart';
|
||||
import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart';
|
||||
|
||||
class MobileIndexMainContent3 extends StatefulWidget {
|
||||
final Map<String, dynamic> content;
|
||||
|
||||
const MobileIndexMainContent3(this.content, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return MobileIndexMainContent3State();
|
||||
}
|
||||
}
|
||||
|
||||
class MobileIndexMainContent3State extends State<MobileIndexMainContent3> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.content == null) {
|
||||
return Container();
|
||||
}
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 5.0),
|
||||
child: Text(
|
||||
'${widget.content['igoshow']}',
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blueGrey,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 5.0),
|
||||
child: Text(
|
||||
'${widget.content['igoshow_solution']}',
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Colors.grey,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Util.showImage(
|
||||
'http:${widget.content['igoshow_image']['image']}',
|
||||
fit: BoxFit.fitWidth
|
||||
),
|
||||
),
|
||||
_buildiGoShowFeatures(),
|
||||
Container(
|
||||
height: 20.0,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildiGoShowFeatures() {
|
||||
Column col = Column(
|
||||
children: [],
|
||||
);
|
||||
for (int i = 0; i < (widget.content['igoshow_features'] as List).length; i++) {
|
||||
col.children.add(Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 5.0),
|
||||
child: Icon(
|
||||
Icons.circle,
|
||||
size: 10.0,
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width - 40.0,
|
||||
padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 5.0),
|
||||
child: Text(
|
||||
'${(widget.content['igoshow_features'] as List)[i]}',
|
||||
style: TextStyle(
|
||||
color: Colors.black54,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
col.children.add(
|
||||
GestureDetector(
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
|
||||
child: Text(
|
||||
S.of(context).learn_more,
|
||||
style: TextStyle(
|
||||
color: Colors.blue,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.0, horizontal: 10.0),
|
||||
child: col,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user