Commit 1490229d authored by tongzifang's avatar tongzifang

feed page

parent 85db5183
......@@ -36,11 +36,9 @@ packages:
base_data_channel:
dependency: transitive
description:
path: "."
ref: "0.0.6"
resolved-ref: "3e244491646d7e4df18a32465477f95b88ddbdfd"
url: "git@git.zmcms.cn:fht/base_data_channel.git"
source: git
path: "/Users/tongzi/AndroidStudioProjects/base_data_channel"
relative: false
source: path
version: "0.0.1"
boolean_selector:
dependency: transitive
......
class UserFeedBackString{
static String get title => "意见反馈";
static String get feedback_type => "问题类型";
static String get feedback_type_a => "产品建议";
static String get feedback_type_a_tip => "反馈产品及服务优化建议";
static String get feedback_type_b => "功能异常";
static String get feedback_type_b_tip => "报错、卡顿、错位等问题";
}
\ No newline at end of file
import 'package:base_data_channel/config/common_colors.dart';
import 'package:base_data_channel/utils/page_utils.dart';
import 'package:flutter/material.dart';
import 'config/user_feedback_strings.dart';
class UserFeedBackPage extends StatefulWidget {
const UserFeedBackPage({Key? key}) : super(key: key);
......@@ -8,10 +12,88 @@ class UserFeedBackPage extends StatefulWidget {
}
class _UserFeedBackPageState extends State<UserFeedBackPage> {
var _feedType = -1; //1=功能异常;2=产品建议
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(child: Text("ffff"),),
backgroundColor: CommonColor.colorF5,
appBar: PageUtils.navigator(context, title: UserFeedBackString.title),
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [_feedbackType()],
),
);
}
_feedbackType() {
return Container(
margin: const EdgeInsets.all(12),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
UserFeedBackString.feedback_type,
style: TextStyle(
color: CommonColor.color33,
fontSize: 17,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [_getFeedTypeSin(1), _getFeedTypeSin(2)],
)
],
),
);
}
_getFeedTypeSin(int feedType) {
return Expanded(
child: GestureDetector(
onTap: () => setState(() {
_feedType = feedType;
}),
child: Container(
margin: EdgeInsets.only(
top: 10,
left: feedType == 2 ? 6 : 0,
right: feedType == 1 ? 6 : 0),
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: _feedType == feedType
? CommonColor.colorMainGreen
: CommonColor.colorF8,
borderRadius: BorderRadius.circular(4)),
child: Text.rich(
TextSpan(children: [
TextSpan(
text: feedType == 1
? UserFeedBackString.feedback_type_a
: UserFeedBackString.feedback_type_b,
style: TextStyle(
color: CommonColor.color33,
fontSize: 15,
fontWeight: FontWeight.w600)),
const TextSpan(
text: "\n",
),
TextSpan(
text: feedType == 1
? UserFeedBackString.feedback_type_a_tip
: UserFeedBackString.feedback_type_b_tip,
style: TextStyle(
color: CommonColor.colorBlack,
fontSize: 12,
fontWeight: FontWeight.w500))
]),
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
),
),
));
}
}
......@@ -14,9 +14,10 @@ dependencies:
sdk: flutter
plugin_platform_interface: ^2.0.2
base_data_channel:
git:
url: git@git.zmcms.cn:fht/base_data_channel.git
ref: 0.0.6
path: /Users/tongzi/AndroidStudioProjects/base_data_channel
# git:
# url: git@git.zmcms.cn:fht/base_data_channel.git
# ref: master
dev_dependencies:
flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment