66 lines
2.1 KiB
Dart
66 lines
2.1 KiB
Dart
import 'package:fcs/theme/theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:fcs/model/language_model.dart';
|
|
import 'package:fcs/model/main_model.dart';
|
|
import 'package:fcs/model/manual_model.dart';
|
|
import 'package:fcs/pages/manual/manual_item_title_dialog.dart';
|
|
import 'package:fcs/pages/util.dart';
|
|
import 'package:fcs/vo/manual.dart';
|
|
import 'package:fcs/widget/local_text.dart';
|
|
import 'package:fcs/widget/progress.dart';
|
|
|
|
class InstructionPage extends StatefulWidget {
|
|
final String image;
|
|
final String name;
|
|
|
|
const InstructionPage({Key key, this.image, this.name}) : super(key: key);
|
|
@override
|
|
_InstructionPageState createState() => _InstructionPageState();
|
|
}
|
|
|
|
class _InstructionPageState extends State<InstructionPage> {
|
|
TextEditingController _manualVersionController = TextEditingController();
|
|
final double dotSize = 10.0;
|
|
List<ManualItem> helpList = new List();
|
|
bool isEng;
|
|
String versionName;
|
|
bool _isLoading = false;
|
|
|
|
@override
|
|
void initState() {
|
|
helpList.clear();
|
|
var manualModel = Provider.of<ManualModel>(context, listen: false);
|
|
var mainModel = Provider.of<MainModel>(context, listen: false);
|
|
versionName = manualModel.version;
|
|
helpList = manualModel.getHelpList(mainModel.isBuyer());
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return LocalProgress(
|
|
inAsyncCall: _isLoading,
|
|
child: Scaffold(
|
|
appBar: AppBar(
|
|
centerTitle: true,
|
|
leading: new IconButton(
|
|
icon: new Icon(Icons.close, color: Colors.white),
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
),
|
|
title: Text(widget.name),
|
|
backgroundColor: primaryColor,
|
|
),
|
|
body: Container(
|
|
padding: EdgeInsets.only(left: 5, right: 5, top: 5),
|
|
child: Card(elevation: 0,
|
|
child: Expanded(
|
|
child: FittedBox(
|
|
child: Image.asset(widget.image), fit: BoxFit.contain),
|
|
)),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|