119 lines
3.4 KiB
Dart
119 lines
3.4 KiB
Dart
|
|
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 MobileIndexMainContent2 extends StatefulWidget {
|
|
final Map<String, dynamic> content;
|
|
|
|
const MobileIndexMainContent2(this.content, {Key key}) : super(key: key);
|
|
|
|
@override
|
|
State<StatefulWidget> createState() {
|
|
return MobileIndexMainContent2State();
|
|
}
|
|
}
|
|
|
|
class MobileIndexMainContent2State extends State<MobileIndexMainContent2> {
|
|
|
|
@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['minipos']}',
|
|
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['point_of_sale_system_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['minipos_image']['image']}',
|
|
fit: BoxFit.fitWidth
|
|
),
|
|
),
|
|
_buildMiniPosFeatures(),
|
|
],
|
|
);
|
|
}
|
|
|
|
Widget _buildMiniPosFeatures() {
|
|
Column col = Column(
|
|
children: [],
|
|
);
|
|
for (int i = 0; i < (widget.content['minipos_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['minipos_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,
|
|
);
|
|
}
|
|
|
|
} |