Merge branch 'master' of 192.168.2.201:laiiihz/akuCommunity

* 'master' of 192.168.2.201:laiiihz/akuCommunity:
  添加意见反馈提交确认
  修改版本号为1.0.3 添加首次打开登录页面的用户隐私协议入口
hmxc
小赖 4 years ago
commit d07da527cc

@ -1,9 +1,12 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:akuCommunity/widget/common_app_bar.dart';
import 'package:akuCommunity/widget/common_image_picker.dart';
import 'package:oktoast/oktoast.dart';
class FeedBackPage extends StatefulWidget {
FeedBackPage({Key key}) : super(key: key);
@ -71,6 +74,12 @@ class _FeedBackPageState extends State<FeedBackPage> {
Widget _inkWellSubmit() {
return InkWell(
onTap: () {
Navigator.pop(context);
Future.delayed(Duration(milliseconds:1000+ Random().nextInt(1000)), () {
showToast('提交成功!');
});
},
child: Container(
alignment: Alignment.center,
height: Screenutil.length(85),

@ -1,10 +1,16 @@
import 'dart:async';
import 'dart:io';
import 'package:akuCommunity/pages/sign/user_authentication_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/base/assets_image.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:path_provider/path_provider.dart';
class SignInPage extends StatefulWidget {
SignInPage({Key key}) : super(key: key);
@ -17,6 +23,8 @@ class _SignInPageState extends State<SignInPage> {
TextEditingController _phone = new TextEditingController();
TextEditingController _code = new TextEditingController();
String _verifyStr = '获取验证码';
String pathPDF = "";
bool _agreementvalue = false;
AppBar _appBar() {
return AppBar(
@ -149,15 +157,43 @@ class _SignInPageState extends State<SignInPage> {
);
}
Future<File> fromAsset(String asset, String filename) async {
// To open from assets, you can copy them to the app storage folder, and the access them "locally"
Completer<File> completer = Completer();
try {
var dir = await getApplicationDocumentsDirectory();
File file = File("${dir.path}/$filename");
var data = await rootBundle.load(asset);
var bytes = data.buffer.asUint8List();
await file.writeAsBytes(bytes, flush: true);
completer.complete(file);
} catch (e) {
throw Exception('Error parsing asset file!');
}
return completer.future;
}
@override
void initState() {
super.initState();
fromAsset('assets/agreement.pdf', 'demo.pdf').then((f) {
setState(() {
pathPDF = f.path;
});
});
}
@override
Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top;
ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
return Scaffold(
backgroundColor: Colors.white,
appBar: _appBar(),
body: SingleChildScrollView(
child: Container(
color: Colors.white,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -190,7 +226,20 @@ class _SignInPageState extends State<SignInPage> {
_containerTextField(
AssetsImage.CODELOGO, _code, '请输入验证码', true),
SizedBox(height: Screenutil.length(59)),
_inkWellLogin()
_inkWellLogin(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FlatButton(
onPressed: () {
Navigator.pushNamed(
context, PageName.agreement_page.toString(),
arguments: Bundle()..putString('path', pathPDF));
},
child: SizedBox(child: Text('用户协议和隐私政策')),
),
],
)
],
),
),

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.1+2
version: 1.0.2+3
environment:
sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save