Merge branch 'master' into development_mirza
# Conflicts: # lib/ui/my_team/view_attendance.dartmerge-requests/12/head
commit
23bb226ae4
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.742" height="32.742" viewBox="0 0 32.742 32.742">
|
||||||
|
<path id="Path_4587" data-name="Path 4587" d="M16.371,0A16.371,16.371,0,1,0,32.742,16.371,16.39,16.39,0,0,0,16.371,0ZM8.186,12.278a2.046,2.046,0,1,1,2.046,2.046A2.05,2.05,0,0,1,8.186,12.278Zm15.42,12.63a1.028,1.028,0,0,1-1.449,0,8.379,8.379,0,0,0-11.576,0,1.023,1.023,0,0,1-1.447-1.447,10.232,10.232,0,0,1,14.472,0A1.024,1.024,0,0,1,23.605,24.909ZM22.51,14.325a2.046,2.046,0,1,1,2.046-2.046A2.05,2.05,0,0,1,22.51,14.325Z" fill="#d56e6d"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 548 B |
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.742" height="32.742" viewBox="0 0 32.742 32.742">
|
||||||
|
<path id="Path_4589" data-name="Path 4589" d="M16.371,0A16.371,16.371,0,1,0,32.742,16.371,16.39,16.39,0,0,0,16.371,0ZM7.162,12.278a3.07,3.07,0,1,1,3.07,3.07A3.073,3.073,0,0,1,7.162,12.278ZM23.6,23.6a10.229,10.229,0,0,1-14.47,0,1.023,1.023,0,1,1,1.447-1.447,8.379,8.379,0,0,0,11.576,0A1.023,1.023,0,1,1,23.6,23.6ZM22.51,15.348a3.07,3.07,0,1,1,3.07-3.07A3.073,3.073,0,0,1,22.51,15.348Z" fill="#8ca742"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 511 B |
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.742" height="32.742" viewBox="0 0 32.742 32.742">
|
||||||
|
<path id="Path_4588" data-name="Path 4588" d="M16.371,0A16.371,16.371,0,1,0,32.742,16.371,16.39,16.39,0,0,0,16.371,0ZM8.186,12.278a2.046,2.046,0,1,1,2.046,2.046A2.05,2.05,0,0,1,8.186,12.278Zm13.3,12.278H11.255a1.023,1.023,0,0,1,0-2.046H21.487a1.023,1.023,0,0,1,0,2.046ZM22.51,14.325a2.046,2.046,0,1,1,2.046-2.046A2.05,2.05,0,0,1,22.51,14.325Z" fill="#ca8432"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 470 B |
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.742" height="32.742" viewBox="0 0 32.742 32.742">
|
||||||
|
<path id="Path_4586" data-name="Path 4586" d="M16.371,0A16.371,16.371,0,1,0,32.742,16.371,16.39,16.39,0,0,0,16.371,0ZM8.186,15.348a3.065,3.065,0,0,1,1.471-2.609L7.543,11.028A1.023,1.023,0,1,1,8.828,9.436l4.355,3.524a3.069,3.069,0,1,1-5,2.388ZM22.228,26.286a1.024,1.024,0,0,1-1.447.035,6.4,6.4,0,0,0-8.822,0,1.023,1.023,0,1,1-1.41-1.484,8.437,8.437,0,0,1,11.642,0A1.023,1.023,0,0,1,22.228,26.286ZM25.2,11.028l-2.116,1.711a3.059,3.059,0,1,1-3.526.221l4.357-3.524A1.023,1.023,0,1,1,25.2,11.028Z" fill="#ca3332"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 619 B |
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="32.742" height="32.742" viewBox="0 0 32.742 32.742">
|
||||||
|
<path id="Path_4590" data-name="Path 4590" d="M16.371,0A16.371,16.371,0,1,0,32.742,16.371,16.39,16.39,0,0,0,16.371,0ZM22.51,10.232a2.046,2.046,0,1,1-2.046,2.046A2.05,2.05,0,0,1,22.51,10.232Zm-12.278,0a2.046,2.046,0,1,1-2.046,2.046A2.05,2.05,0,0,1,10.232,10.232Zm6.139,18.417a12.305,12.305,0,0,1-11.81-8.93,1.024,1.024,0,0,1,.984-1.3H27.2a1.02,1.02,0,0,1,.814.405,1.031,1.031,0,0,1,.17.9A12.305,12.305,0,0,1,16.371,28.649Z" fill="#20a16a"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 549 B |
@ -0,0 +1,111 @@
|
|||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||||
|
import 'package:mohem_flutter_app/config/routes.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||||
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||||
|
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||||
|
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
|
||||||
|
|
||||||
|
class SurveyScreen extends StatefulWidget {
|
||||||
|
const SurveyScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SurveyScreenState createState() => _SurveyScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SurveyScreenState extends State<SurveyScreen> {
|
||||||
|
String reviewText = "";
|
||||||
|
int _selectedIndex = -1;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: MyColors.backgroundColor,
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: ListView(
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
124.height,
|
||||||
|
LocaleKeys.feedbackUserExperience.tr().toText19(),
|
||||||
|
27.height,
|
||||||
|
LocaleKeys.rateUI.tr().toText16(),
|
||||||
|
22.height,
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
RatingBar.builder(
|
||||||
|
initialRating: 3,
|
||||||
|
minRating: 1,
|
||||||
|
direction: Axis.horizontal,
|
||||||
|
allowHalfRating: true,
|
||||||
|
itemCount: 5,
|
||||||
|
itemPadding: EdgeInsets.symmetric(horizontal: 12),
|
||||||
|
itemBuilder: (context, _) => Icon(
|
||||||
|
Icons.star,
|
||||||
|
color: Colors.amber,
|
||||||
|
),
|
||||||
|
onRatingUpdate: (rating) {},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
).paddingOnly(left: 22, right: 22, top: 12, bottom: 12).objectContainerView(disablePadding: true),
|
||||||
|
39.height,
|
||||||
|
LocaleKeys.rateUI.tr().toText16(),
|
||||||
|
10.height,
|
||||||
|
GridView(
|
||||||
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 5, crossAxisSpacing: 7, mainAxisSpacing: 7),
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
padding: const EdgeInsets.only(top: 0),
|
||||||
|
shrinkWrap: true,
|
||||||
|
children: [
|
||||||
|
optionUI("poor.svg", 0),
|
||||||
|
optionUI("bad.svg", 1),
|
||||||
|
optionUI("normal.svg", 2),
|
||||||
|
optionUI("good.svg", 3),
|
||||||
|
optionUI("xcellent.svg", 4),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
27.height,
|
||||||
|
DynamicTextFieldWidget(
|
||||||
|
LocaleKeys.description.tr(),
|
||||||
|
LocaleKeys.typeHere.tr(),
|
||||||
|
lines: 3,
|
||||||
|
),
|
||||||
|
150.height
|
||||||
|
],
|
||||||
|
).paddingOnly(left: 21, right: 21),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
DefaultButton(LocaleKeys.submitSurvey.tr(), () async {}).insideContainer,
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget optionUI(String icon, int index) {
|
||||||
|
return (_selectedIndex == index
|
||||||
|
? SvgPicture.asset(
|
||||||
|
'assets/images/' + icon,
|
||||||
|
height: 32,
|
||||||
|
width: 32,
|
||||||
|
).objectContainerBorderView(disablePadding: true, borderColor: MyColors.textMixColor, disableWidth: true, isAlignment: true)
|
||||||
|
: SvgPicture.asset(
|
||||||
|
'assets/images/' + icon,
|
||||||
|
height: 32,
|
||||||
|
width: 32,
|
||||||
|
).objectContainerView(
|
||||||
|
disablePadding: true,
|
||||||
|
))
|
||||||
|
.onPress(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue