WT1.1.2g Sizes
This commit is contained in:
parent
e28f1edf50
commit
b71544ba13
@ -362,7 +362,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 29;
|
||||
CURRENT_PROJECT_VERSION = 30;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -505,7 +505,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 29;
|
||||
CURRENT_PROJECT_VERSION = 30;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@ -540,7 +540,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||
CURRENT_PROJECT_VERSION = 29;
|
||||
CURRENT_PROJECT_VERSION = 30;
|
||||
DEVELOPMENT_TEAM = SFJJBDCU6Z;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -38,8 +38,11 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> {
|
||||
final List<Property> womanSizes = List();
|
||||
final List<Property> manSizes = List();
|
||||
|
||||
final double baseWidth = 312;
|
||||
final double baseHeight = 675.2;
|
||||
double mediaWidth = 0;
|
||||
double mediaHeight = 0;
|
||||
bool isMan = true;
|
||||
|
||||
@override
|
||||
ExerciseNewBloc({this.exerciseRepository, this.menuBloc, this.customerRepository, ExerciseType exerciseType})
|
||||
@ -52,6 +55,8 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> {
|
||||
weight = customerRepository.customer.getProperty("Weight");
|
||||
height = customerRepository.customer.getProperty("Height");
|
||||
fitnessLevel = customerRepository.customer.fitnessLevel;
|
||||
this.isMan = (customerRepository.customer.sex == "m");
|
||||
print("Sex Man? " + isMan.toString() + " " + customerRepository.customer.sex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,66 +68,72 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> {
|
||||
|
||||
void addSizes(String sex) {
|
||||
List<Property> properties = Cache().getProperties();
|
||||
if (sex == "Man") {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
final double distortionWidth = mediaWidth / baseWidth;
|
||||
final double distortionHeight = mediaHeight / baseHeight;
|
||||
print("distiortionW " + distortionWidth.toString() + " dH " + distortionHeight.toString());
|
||||
if (isMan) {
|
||||
properties.forEach((element) {
|
||||
if (element.propertyName == "Shoulder") {
|
||||
element.top = (mediaHeight * 0.131).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (122 * distortionHeight).toInt();
|
||||
element.left = (130 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Shoulder");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Neck") {
|
||||
element.top = (mediaHeight * 0.069).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (68 * distortionHeight).toInt();
|
||||
element.left = (130 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Neck");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Biceps") {
|
||||
element.top = (mediaHeight * 0.199).toInt();
|
||||
element.left = (mediaWidth * 0.44).toInt();
|
||||
element.top = (178 * distortionHeight).toInt();
|
||||
element.left = (208 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Biceps");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Chest") {
|
||||
element.top = (mediaHeight * 0.171).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (154 * distortionHeight).toInt();
|
||||
element.left = (130 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Chest");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Belly") {
|
||||
element.top = (mediaHeight * 0.275).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (244 * distortionHeight).toInt();
|
||||
element.left = (130 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Belly");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Hip") {
|
||||
element.top = (mediaHeight * 0.355).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (308 * distortionHeight).toInt();
|
||||
element.left = (130 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Hip");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Thigh Top") {
|
||||
element.top = (mediaHeight * 0.38).toInt();
|
||||
element.left = (mediaWidth * 0.32).toInt();
|
||||
element.top = (332 * distortionHeight).toInt();
|
||||
element.left = (165 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Thigh Top");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Thigh Middle") {
|
||||
element.top = (mediaHeight * 0.438).toInt();
|
||||
element.left = (mediaWidth * 0.14).toInt();
|
||||
element.top = (382 * distortionHeight).toInt();
|
||||
element.left = (100 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Thigh Middle");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Knee") {
|
||||
element.top = (mediaHeight * 0.535).toInt();
|
||||
element.left = (mediaWidth * 0.14).toInt();
|
||||
element.top = (464 * distortionHeight).toInt();
|
||||
element.left = (97 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Knee");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Calf") {
|
||||
element.top = (mediaHeight * 0.60).toInt();
|
||||
element.left = (mediaWidth * 0.14).toInt();
|
||||
element.top = (520 * distortionHeight).toInt();
|
||||
element.left = (97 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Calf");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Ankle") {
|
||||
element.top = (mediaHeight * 0.72).toInt();
|
||||
element.left = (mediaWidth * 0.28).toInt();
|
||||
element.top = (620 * distortionHeight).toInt();
|
||||
element.left = (150 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Ankle");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Weight") {
|
||||
element.top = (mediaHeight * 0.44).toInt();
|
||||
element.left = (mediaWidth * 0.54).toInt();
|
||||
element.top = (402 * distortionHeight).toInt();
|
||||
element.left = (240 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Weight");
|
||||
manSizes.add(element);
|
||||
}
|
||||
@ -130,63 +141,65 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> {
|
||||
} else {
|
||||
properties.forEach((element) {
|
||||
if (element.propertyName == "Shoulder") {
|
||||
element.top = (mediaHeight * 0.131).toInt();
|
||||
element.left = (mediaWidth * 0.195).toInt();
|
||||
element.top = (122 * distortionHeight).toInt();
|
||||
element.left = (151 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Shoulder");
|
||||
print("CHEST top: " + element.top.toString() + " left " + element.left.toString());
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Neck") {
|
||||
element.top = (mediaHeight * 0.081).toInt();
|
||||
element.left = (mediaWidth * 0.195).toInt();
|
||||
element.top = (78 * distortionHeight).toInt();
|
||||
element.left = (151 * distortionWidth).toInt();
|
||||
print("Neck top: " + element.top.toString() + " left " + element.left.toString());
|
||||
element.value = customerRepository.customer.getProperty("Neck");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Biceps") {
|
||||
element.top = (mediaHeight * 0.199).toInt();
|
||||
element.left = (mediaWidth * 0.36).toInt();
|
||||
element.top = (178 * distortionHeight).toInt();
|
||||
element.left = (212 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Biceps");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Chest") {
|
||||
element.top = (mediaHeight * 0.168).toInt();
|
||||
element.left = (mediaWidth * 0.195).toInt();
|
||||
element.top = (154 * distortionHeight).toInt();
|
||||
element.left = (151 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Chest");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Belly") {
|
||||
element.top = (mediaHeight * 0.26).toInt();
|
||||
element.left = (mediaWidth * 0.195).toInt();
|
||||
element.top = (230 * distortionHeight).toInt();
|
||||
element.left = (151 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Belly");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Hip") {
|
||||
element.top = (mediaHeight * 0.335).toInt();
|
||||
element.left = (mediaWidth * 0.195).toInt();
|
||||
element.top = (294 * distortionHeight).toInt();
|
||||
element.left = (151 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Hip");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Thigh Top") {
|
||||
element.top = (mediaHeight * 0.385).toInt();
|
||||
element.left = (mediaWidth * 0.28).toInt();
|
||||
element.top = (335 * distortionHeight).toInt();
|
||||
element.left = (185 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Thigh Top");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Thigh Middle") {
|
||||
element.top = (mediaHeight * 0.433).toInt();
|
||||
element.left = (mediaWidth * 0.12).toInt();
|
||||
element.top = (377 * distortionHeight).toInt();
|
||||
element.left = (125 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Thigh Middle");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Knee") {
|
||||
element.top = (mediaHeight * 0.543).toInt();
|
||||
element.left = (mediaWidth * 0.14).toInt();
|
||||
element.top = (468 * distortionHeight).toInt();
|
||||
element.left = (129 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Knee");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Calf") {
|
||||
element.top = (mediaHeight * 0.608).toInt();
|
||||
element.left = (mediaWidth * 0.14).toInt();
|
||||
element.top = (525 * distortionHeight).toInt();
|
||||
element.left = (129 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Calf");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Ankle") {
|
||||
element.top = (mediaHeight * 0.725).toInt();
|
||||
element.left = (mediaWidth * 0.23).toInt();
|
||||
element.top = (620 * distortionHeight).toInt();
|
||||
element.left = (162 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Ankle");
|
||||
manSizes.add(element);
|
||||
} else if (element.propertyName == "Weight") {
|
||||
element.top = (mediaHeight * 0.44).toInt();
|
||||
element.left = (mediaWidth * 0.54).toInt();
|
||||
element.top = (402 * distortionHeight).toInt();
|
||||
element.left = (240 * distortionWidth).toInt();
|
||||
element.value = customerRepository.customer.getProperty("Weight");
|
||||
manSizes.add(element);
|
||||
}
|
||||
|
@ -98,9 +98,6 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans {
|
||||
},
|
||||
builder: (context, state) {
|
||||
final exerciseBloc = BlocProvider.of<ExerciseNewBloc>(context);
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
exerciseBloc.setMediaDimensions(width, height);
|
||||
return getExerciseWidget(exerciseBloc, exerciseType);
|
||||
},
|
||||
));
|
||||
|
@ -35,14 +35,11 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
final accountBloc = BlocProvider.of<AccountBloc>(context);
|
||||
setContext(context);
|
||||
return BlocProvider(
|
||||
create: (context) => LoginFormBloc(
|
||||
userRepository: UserRepository(),
|
||||
accountBloc: accountBloc
|
||||
),
|
||||
create: (context) => LoginFormBloc(userRepository: UserRepository(), accountBloc: accountBloc),
|
||||
child: Builder(builder: (context) {
|
||||
final loginBloc = BlocProvider.of<LoginFormBloc>(context);
|
||||
return Scaffold(
|
||||
key: _scaffoldKey,
|
||||
//key: _scaffoldKey,
|
||||
appBar: AppBarMin(),
|
||||
body: FormBlocListener<LoginFormBloc, String, String>(
|
||||
onSubmitting: (context, state) {
|
||||
@ -56,11 +53,8 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
LoadingDialog.hide(context);
|
||||
showInSnackBar(t(state.failureResponse));
|
||||
},
|
||||
onLoaded: (context, state ) {
|
||||
|
||||
},
|
||||
child: loadForm(loginBloc, accountBloc)
|
||||
),
|
||||
onLoaded: (context, state) {},
|
||||
child: loadForm(loginBloc, accountBloc)),
|
||||
);
|
||||
}));
|
||||
}
|
||||
@ -83,14 +77,11 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
}
|
||||
|
||||
Widget buildLoginForm(LoginFormBloc formBloc, AccountBloc accountBloc) {
|
||||
|
||||
return Form(
|
||||
key: _scaffoldKey,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 15, right: 50),
|
||||
child:
|
||||
ListView(shrinkWrap: false, padding: EdgeInsets.only(top: 150.0),
|
||||
children: <Widget>[
|
||||
child: ListView(shrinkWrap: false, padding: EdgeInsets.only(top: 150.0), children: <Widget>[
|
||||
Divider(color: Colors.transparent),
|
||||
/* FlatButton(
|
||||
child: new Image.asset(
|
||||
@ -109,10 +100,8 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context).translate('Login'),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, fontSize: 24)),
|
||||
child: new Text(AppLocalizations.of(context).translate('Login'),
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -142,39 +131,28 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
Divider(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
|
||||
new FlatButton(
|
||||
key: LibraryKeys.loginOKButton,
|
||||
child: Image.asset('asset/image/WT_OK.png',
|
||||
width: 100, height: 100),
|
||||
onPressed: () => {
|
||||
formBloc.add(SubmitFormBloc())
|
||||
}),
|
||||
child: Image.asset('asset/image/WT_OK.png', width: 100, height: 100),
|
||||
onPressed: () => {formBloc.add(SubmitFormBloc())}),
|
||||
]),
|
||||
Divider(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: <Widget>[
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context).translate('SignUp')),
|
||||
onTap: () =>
|
||||
Navigator.of(context).pushNamed('registration'),
|
||||
child: new Text(AppLocalizations.of(context).translate('SignUp')),
|
||||
onTap: () => Navigator.of(context).pushNamed('registration'),
|
||||
),
|
||||
Spacer(flex: 2),
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context).translate('I forgot the password')),
|
||||
child: new Text(AppLocalizations.of(context).translate('I forgot the password')),
|
||||
onTap: () => Navigator.of(context).pushNamed('resetPassword'),
|
||||
),
|
||||
Spacer(flex: 2),
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context).translate('Privacy')),
|
||||
child: new Text(AppLocalizations.of(context).translate('Privacy')),
|
||||
onTap: () => Navigator.of(context).pushNamed('gdpr'),
|
||||
),
|
||||
]),
|
||||
@ -182,11 +160,8 @@ class _LoginWidget extends State<LoginWidget> with Common, Trans {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void showInSnackBar(String error) {
|
||||
_scaffoldKey.currentState.showSnackBar(SnackBar(
|
||||
backgroundColor: Colors.orange,
|
||||
content: Text(error, style: TextStyle(color: Colors.white))));
|
||||
_scaffoldKey.currentState
|
||||
.showSnackBar(SnackBar(backgroundColor: Colors.orange, content: Text(error, style: TextStyle(color: Colors.white))));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ class RegistrationPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RegistrationWidget(
|
||||
userRepository: userRepository, customerRepository: customerRepository);
|
||||
return RegistrationWidget(userRepository: userRepository, customerRepository: customerRepository);
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,20 +36,16 @@ class RegistrationWidget extends StatefulWidget {
|
||||
|
||||
class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cWidth = mediaSizeWidth(context);
|
||||
// ignore: close_sinks
|
||||
final accountBloc = BlocProvider.of<AccountBloc>(context);
|
||||
return BlocProvider(
|
||||
create: (context) => RegistrationFormBloc(
|
||||
userRepository: UserRepository(), accountBloc: accountBloc),
|
||||
create: (context) => RegistrationFormBloc(userRepository: UserRepository(), accountBloc: accountBloc),
|
||||
child: Builder(builder: (context) {
|
||||
// ignore: close_sinks
|
||||
final registrationBloc =
|
||||
BlocProvider.of<RegistrationFormBloc>(context);
|
||||
final registrationBloc = BlocProvider.of<RegistrationFormBloc>(context);
|
||||
|
||||
return Scaffold(
|
||||
key: _scaffoldKey,
|
||||
@ -80,12 +75,9 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
||||
),
|
||||
),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(left: 25, right: 50),
|
||||
child: ListView(
|
||||
shrinkWrap: false,
|
||||
padding: EdgeInsets.only(top: 150.0),
|
||||
child: ListView(shrinkWrap: false, padding: EdgeInsets.only(top: 150.0),
|
||||
//mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
Divider(
|
||||
@ -109,12 +101,8 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context)
|
||||
.translate('SignUp'),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 24)),
|
||||
child: new Text(AppLocalizations.of(context).translate('SignUp'),
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 24)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -144,37 +132,20 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
||||
Divider(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
|
||||
new FlatButton(
|
||||
child: Image.asset(
|
||||
'asset/image/WT_OK.png',
|
||||
width: 100,
|
||||
height: 100),
|
||||
onPressed: () => {
|
||||
registrationBloc
|
||||
.add(SubmitFormBloc())
|
||||
}),
|
||||
child: Image.asset('asset/image/WT_OK.png', width: 100, height: 100),
|
||||
onPressed: () => {registrationBloc.add(SubmitFormBloc())}),
|
||||
]),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: <Widget>[
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context)
|
||||
.translate('Login')),
|
||||
onTap: () => Navigator.of(context)
|
||||
.pushNamed('login'),
|
||||
child: new Text(AppLocalizations.of(context).translate('Login')),
|
||||
onTap: () => Navigator.of(context).pushNamed('login'),
|
||||
),
|
||||
Spacer(flex: 1),
|
||||
new InkWell(
|
||||
child: new Text(
|
||||
AppLocalizations.of(context)
|
||||
.translate('Privacy')),
|
||||
onTap: () => Navigator.of(context)
|
||||
.pushNamed('gdpr'),
|
||||
child: new Text(AppLocalizations.of(context).translate('Privacy')),
|
||||
onTap: () => Navigator.of(context).pushNamed('gdpr'),
|
||||
),
|
||||
Spacer(flex: 2),
|
||||
]),
|
||||
@ -191,11 +162,7 @@ class _RegistrationWidget extends State<RegistrationWidget> with Common {
|
||||
void showInSnackBar(String error) {
|
||||
_scaffoldKey.currentState.showSnackBar(SnackBar(
|
||||
backgroundColor: Colors.orange,
|
||||
content: Text(
|
||||
AppLocalizations.of(context)
|
||||
.translate("There is an error: during registration:") +
|
||||
" " +
|
||||
error,
|
||||
content: Text(AppLocalizations.of(context).translate("There is an error: during registration:") + " " + error,
|
||||
style: TextStyle(color: Colors.white))));
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
|
||||
_buildChild(BuildContext context) => Container(
|
||||
height: 350,
|
||||
decoration: BoxDecoration(color: Colors.white60, shape: BoxShape.rectangle, borderRadius: BorderRadius.all(Radius.circular(12))),
|
||||
decoration: BoxDecoration(color: Colors.grey[700], shape: BoxShape.rectangle, borderRadius: BorderRadius.all(Radius.circular(12))),
|
||||
child: KeyboardActions(
|
||||
config: _buildConfig(context),
|
||||
child: Column(
|
||||
@ -107,7 +107,7 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
]),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white70,
|
||||
color: Colors.grey[900],
|
||||
shape: BoxShape.rectangle,
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12))),
|
||||
),
|
||||
|
@ -42,6 +42,7 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Stack(
|
||||
alignment: Alignment.center,
|
||||
children: getSizeFigure(),
|
||||
)
|
||||
]))),
|
||||
@ -49,16 +50,20 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
}
|
||||
|
||||
List<Widget> getSizeFigure() {
|
||||
//print("w " + MediaQuery.of(context).size.width.toString() + "h " + MediaQuery.of(context).size.height.toString());
|
||||
double mediaWidth = MediaQuery.of(context).size.width * .8;
|
||||
double mediaHeight = MediaQuery.of(context).size.height * .8;
|
||||
print("w " + mediaWidth.toString() + "h " + mediaHeight.toString());
|
||||
widget.exerciseBloc.setMediaDimensions(mediaWidth, mediaHeight);
|
||||
List<Widget> list = List();
|
||||
list.add(SizedBox(
|
||||
width: MediaQuery.of(context).size.width * .80,
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
//child: Container(color: Colors.black87),
|
||||
width: mediaWidth,
|
||||
height: mediaHeight,
|
||||
));
|
||||
list.add(
|
||||
Positioned(
|
||||
top: 20,
|
||||
left: 160,
|
||||
top: mediaHeight * .07,
|
||||
left: widget.exerciseBloc.isMan ? mediaWidth * .62 : mediaWidth * .65,
|
||||
child: Stack(
|
||||
alignment: Alignment.topLeft,
|
||||
children: [
|
||||
@ -72,7 +77,7 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
color: Colors.black54,
|
||||
),
|
||||
],
|
||||
fontSize: 22,
|
||||
fontSize: 20,
|
||||
color: Colors.orange[500],
|
||||
)),
|
||||
Positioned(
|
||||
@ -83,20 +88,24 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
icon: Icon(Icons.save),
|
||||
iconSize: 40,
|
||||
hoverColor: Colors.blueAccent,
|
||||
color: widget.exerciseBloc.changedSizes ? Colors.orange[300] : Colors.black54,
|
||||
color: widget.exerciseBloc.changedSizes ? Colors.orange[300] : Colors.black87,
|
||||
onPressed: () => {print("Save"), widget.exerciseBloc.add(ExerciseNewSaveWeight())}))
|
||||
],
|
||||
)),
|
||||
);
|
||||
list.add(widget.exerciseBloc.customerRepository.sex == "Man"
|
||||
list.add(
|
||||
widget.exerciseBloc.isMan
|
||||
? Image.asset(
|
||||
"asset/image/man_sizes.png",
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
height: mediaHeight,
|
||||
width: mediaWidth,
|
||||
)
|
||||
: Image.asset(
|
||||
"asset/image/woman_sizes.png",
|
||||
height: MediaQuery.of(context).size.height * .80,
|
||||
));
|
||||
height: mediaHeight,
|
||||
width: mediaWidth,
|
||||
),
|
||||
);
|
||||
|
||||
list.addAll(getSizeElements());
|
||||
return list;
|
||||
@ -111,18 +120,41 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
top: element.top.toDouble(),
|
||||
left: element.left.toDouble(),
|
||||
child: element.value != 0
|
||||
? IconButton(
|
||||
? Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.exerciseBloc.isMan ? Colors.green[800] : Color(0xFFEA776C),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
child: IconButton(
|
||||
icon: Icon(CustomIcon.ok_circled),
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.green[200],
|
||||
onPressed: () => onPressed(element),
|
||||
)
|
||||
: IconButton(
|
||||
icon: Icon(CustomIcon.question),
|
||||
))
|
||||
: Container(
|
||||
width: 20,
|
||||
height: 20,
|
||||
padding: EdgeInsets.zero,
|
||||
decoration: BoxDecoration(
|
||||
color: widget.exerciseBloc.isMan ? Color(0xFF369fb9) : Color(0xFFEA776C),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: IconButton(
|
||||
icon: Icon(
|
||||
CustomIcon.help_circled,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
color: Colors.red[800],
|
||||
splashColor: Colors.amber,
|
||||
onPressed: () => onPressed(element),
|
||||
)),
|
||||
))),
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user