mirror of
https://github.com/asjqkkkk/flutter-todos.git
synced 2025-08-26 14:06:29 +08:00
✨: Add SelectableText in feedback wall.
Replace TargetPlatform.android to iOS in TextFormField.
This commit is contained in:
@ -287,15 +287,11 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
|
||||
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
|
||||
);
|
||||
|
@ -4,5 +4,7 @@
|
||||
<dict>
|
||||
<key>BuildSystemType</key>
|
||||
<string>Original</string>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -90,11 +90,12 @@ class FeedbackItem extends StatelessWidget {
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Text(
|
||||
SelectableText(
|
||||
suggestion ?? "nothing",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
|
||||
),
|
||||
SizedBox(
|
||||
height: 30,
|
||||
|
@ -25,6 +25,7 @@ class MyApp extends StatelessWidget {
|
||||
// ... app-specific localization delegate[s] here
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
DemoLocalizationsDelegate()
|
||||
],
|
||||
supportedLocales: [
|
||||
|
@ -21,96 +21,92 @@ class RegisterPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(left: 20,right: 20),
|
||||
child: Form(
|
||||
key: model.formKey,
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
platform: TargetPlatform.android, primaryColor: primaryColor),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
validator: (text) => model.logic.validatorUserName(text),
|
||||
maxLength: 20,
|
||||
textCapitalization: TextCapitalization.words,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
validator: (text) => model.logic.validatorUserName(text),
|
||||
maxLength: 20,
|
||||
textCapitalization: TextCapitalization.words,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
hintText: DemoLocalizations.of(context).setUserName,
|
||||
labelText: DemoLocalizations.of(context).userName,
|
||||
),
|
||||
style: TextStyle(
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
validator: (text) => model.logic.validatorEmail(text),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.email),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).setEmailAccount,
|
||||
labelText: DemoLocalizations.of(context).emailAccount,
|
||||
),
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
),
|
||||
const SizedBox(height: 48.0),
|
||||
TextFormField(
|
||||
validator: (verifyCode) =>
|
||||
model.logic.validatorVerifyCode(verifyCode),
|
||||
maxLength: 6,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
hintText: DemoLocalizations.of(context).setUserName,
|
||||
labelText: DemoLocalizations.of(context).userName,
|
||||
),
|
||||
style: TextStyle(
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
prefixIcon: Icon(Icons.message),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).inputVerifyCode,
|
||||
labelText: DemoLocalizations.of(context).verifyCode,
|
||||
suffixIcon: VerifyCodeWidget(
|
||||
account: model.email,
|
||||
isEmailOk: model.isEmailOk,
|
||||
isUserNameOk: model.isUserNameOk,
|
||||
)
|
||||
),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
validator: (text) => model.logic.validatorEmail(text),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.email),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).setEmailAccount,
|
||||
labelText: DemoLocalizations.of(context).emailAccount,
|
||||
),
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validatePassword(password),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_outline),
|
||||
hintText: DemoLocalizations.of(context).setPassword,
|
||||
labelText: DemoLocalizations.of(context).thePassword,
|
||||
),
|
||||
const SizedBox(height: 48.0),
|
||||
TextFormField(
|
||||
validator: (verifyCode) =>
|
||||
model.logic.validatorVerifyCode(verifyCode),
|
||||
maxLength: 6,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.message),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).inputVerifyCode,
|
||||
labelText: DemoLocalizations.of(context).verifyCode,
|
||||
suffixIcon: VerifyCodeWidget(
|
||||
account: model.email,
|
||||
isEmailOk: model.isEmailOk,
|
||||
isUserNameOk: model.isUserNameOk,
|
||||
)
|
||||
),
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (rePassword) =>
|
||||
model.logic.validateRePassword(rePassword),
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.lock),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).reSetPassword,
|
||||
labelText: DemoLocalizations.of(context).confirmPassword,
|
||||
),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validatePassword(password),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_outline),
|
||||
hintText: DemoLocalizations.of(context).setPassword,
|
||||
labelText: DemoLocalizations.of(context).thePassword,
|
||||
),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (rePassword) =>
|
||||
model.logic.validateRePassword(rePassword),
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.lock),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).reSetPassword,
|
||||
labelText: DemoLocalizations.of(context).confirmPassword,
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
],
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -56,23 +56,19 @@ class EditTaskPage extends StatelessWidget {
|
||||
height: 49,
|
||||
child: Form(
|
||||
autovalidate: true,
|
||||
child: Theme(
|
||||
//目前ios还存在长按复制奔溃的问题,这里是为了解决这个问题
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextFormField(
|
||||
style: TextStyle(color: textColor,textBaseline: TextBaseline.alphabetic),
|
||||
textAlign: TextAlign.center,
|
||||
validator: (text) {
|
||||
model.currentTaskName = text;
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: model.logic.getHintTitle(),
|
||||
hintStyle: TextStyle(color: hintTextColor),
|
||||
),
|
||||
maxLines: 1,
|
||||
child: TextFormField(
|
||||
style: TextStyle(color: textColor,textBaseline: TextBaseline.alphabetic),
|
||||
textAlign: TextAlign.center,
|
||||
validator: (text) {
|
||||
model.currentTaskName = text;
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: model.logic.getHintTitle(),
|
||||
hintStyle: TextStyle(color: hintTextColor),
|
||||
),
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -167,43 +163,40 @@ class EditTaskPage extends StatelessWidget {
|
||||
height: 1,
|
||||
color: Colors.grey.withOpacity(0.5),
|
||||
),
|
||||
Theme(
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextField(
|
||||
controller: model.textEditingController
|
||||
..addListener(model.logic.editListener),
|
||||
autofocus: model.taskDetails.length > 0 ? false : true,
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
textBaseline: TextBaseline.alphabetic
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).addTask,
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(
|
||||
color: hintTextColor,
|
||||
),
|
||||
prefixIcon: Icon(
|
||||
iconData,
|
||||
color: iconColor,
|
||||
),
|
||||
suffixIcon: GestureDetector(
|
||||
onTap: model.logic.submitOneItem,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: model.canAddTaskDetail
|
||||
? iconColor
|
||||
: Colors.grey.withOpacity(0.4)),
|
||||
child: Icon(
|
||||
Icons.arrow_upward,
|
||||
color: bgColor,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
)),
|
||||
TextField(
|
||||
controller: model.textEditingController
|
||||
..addListener(model.logic.editListener),
|
||||
autofocus: model.taskDetails.length > 0 ? false : true,
|
||||
style: TextStyle(
|
||||
color: textColor,
|
||||
textBaseline: TextBaseline.alphabetic
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).addTask,
|
||||
border: InputBorder.none,
|
||||
hintStyle: TextStyle(
|
||||
color: hintTextColor,
|
||||
),
|
||||
prefixIcon: Icon(
|
||||
iconData,
|
||||
color: iconColor,
|
||||
),
|
||||
suffixIcon: GestureDetector(
|
||||
onTap: model.logic.submitOneItem,
|
||||
child: Container(
|
||||
margin: EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: model.canAddTaskDetail
|
||||
? iconColor
|
||||
: Colors.grey.withOpacity(0.4)),
|
||||
child: Icon(
|
||||
Icons.arrow_upward,
|
||||
color: bgColor,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
height: 40,
|
||||
|
@ -27,104 +27,100 @@ class ResetPasswordPage extends StatelessWidget {
|
||||
margin: EdgeInsets.only(left: 20, right: 20),
|
||||
child: Form(
|
||||
key: model.formKey,
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
platform: TargetPlatform.android, primaryColor: primaryColor),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
model.isReset ? Container() : SizedBox(height: 24.0),
|
||||
model.isReset
|
||||
? Container()
|
||||
: TextFormField(
|
||||
validator: (text) => model.logic.validatorEmail(text),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.email),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).inputEmail,
|
||||
labelText:
|
||||
DemoLocalizations.of(context).emailAccount,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
model.isReset ? Container() : SizedBox(height: 24.0),
|
||||
model.isReset
|
||||
? Container()
|
||||
: TextFormField(
|
||||
validator: (text) => model.logic.validatorEmail(text),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.email),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).inputEmail,
|
||||
labelText:
|
||||
DemoLocalizations.of(context).emailAccount,
|
||||
),
|
||||
model.isReset ? Container() : const SizedBox(height: 24.0),
|
||||
model.isReset
|
||||
? Container()
|
||||
: TextFormField(
|
||||
validator: (verifyCode) =>
|
||||
model.logic.validatorVerifyCode(verifyCode),
|
||||
maxLength: 6,
|
||||
keyboardType: TextInputType.number,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.message),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).inputVerifyCode,
|
||||
labelText:
|
||||
DemoLocalizations.of(context).verifyCode,
|
||||
suffixIcon: VerifyCodeWidget(
|
||||
account: model.emailAccount,
|
||||
isEmailOk: model.isEmailOk,
|
||||
)),
|
||||
),
|
||||
model.isReset ? const SizedBox(height: 24.0) : Container(),
|
||||
model.isReset
|
||||
? TextFormField(
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validateOldPassword(password),
|
||||
decoration: InputDecoration(
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
model.isReset ? Container() : const SizedBox(height: 24.0),
|
||||
model.isReset
|
||||
? Container()
|
||||
: TextFormField(
|
||||
validator: (verifyCode) =>
|
||||
model.logic.validatorVerifyCode(verifyCode),
|
||||
maxLength: 6,
|
||||
keyboardType: TextInputType.number,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_open),
|
||||
prefixIcon: Icon(Icons.message),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).inputOldPassword,
|
||||
DemoLocalizations.of(context).inputVerifyCode,
|
||||
labelText:
|
||||
DemoLocalizations.of(context).oldPassword,
|
||||
),
|
||||
obscureText: true,
|
||||
)
|
||||
: Container(),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validateNewPassword(password),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_outline),
|
||||
hintText: DemoLocalizations.of(context).setNewPassword,
|
||||
labelText: DemoLocalizations.of(context).newPassword,
|
||||
),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
DemoLocalizations.of(context).verifyCode,
|
||||
suffixIcon: VerifyCodeWidget(
|
||||
account: model.emailAccount,
|
||||
isEmailOk: model.isEmailOk,
|
||||
)),
|
||||
),
|
||||
model.isReset ? const SizedBox(height: 24.0) : Container(),
|
||||
model.isReset
|
||||
? TextFormField(
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validateOldPassword(password),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_open),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).inputOldPassword,
|
||||
labelText:
|
||||
DemoLocalizations.of(context).oldPassword,
|
||||
),
|
||||
obscureText: true,
|
||||
)
|
||||
: Container(),
|
||||
SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (password) =>
|
||||
model.logic.validateNewPassword(password),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: Colors.transparent,
|
||||
prefixIcon: Icon(Icons.lock_outline),
|
||||
hintText: DemoLocalizations.of(context).setNewPassword,
|
||||
labelText: DemoLocalizations.of(context).newPassword,
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (rePassword) =>
|
||||
model.logic.validateRePassword(rePassword),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.lock),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).reSetPassword,
|
||||
labelText: DemoLocalizations.of(context).confirmPassword,
|
||||
),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
TextFormField(
|
||||
maxLength: 20,
|
||||
validator: (rePassword) =>
|
||||
model.logic.validateRePassword(rePassword),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
prefixIcon: Icon(Icons.lock),
|
||||
fillColor: Colors.transparent,
|
||||
hintText: DemoLocalizations.of(context).reSetPassword,
|
||||
labelText: DemoLocalizations.of(context).confirmPassword,
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
],
|
||||
),
|
||||
obscureText: true,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
),
|
||||
const SizedBox(height: 24.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -64,27 +64,23 @@ class FeedbackPage extends StatelessWidget {
|
||||
),
|
||||
child: Form(
|
||||
autovalidate: true,
|
||||
child: Theme(
|
||||
//使用下面这个data是因为目前ios上有长按复制奔溃的问题,下面这样可以解决这个问题
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextFormField(
|
||||
expands: true,
|
||||
maxLines: null,
|
||||
validator: (text) {
|
||||
model.feedbackContent = text;
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(
|
||||
color: isDarkNow ? Colors.grey : Colors.black,
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.all(10),
|
||||
border: InputBorder.none,
|
||||
hintText:
|
||||
DemoLocalizations.of(context).writeYourFeedback,
|
||||
hintStyle: TextStyle(color: Colors.grey)),
|
||||
maxLength: 2000,
|
||||
),
|
||||
child: TextFormField(
|
||||
expands: true,
|
||||
maxLines: null,
|
||||
validator: (text) {
|
||||
model.feedbackContent = text;
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(
|
||||
color: isDarkNow ? Colors.grey : Colors.black,
|
||||
textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.all(10),
|
||||
border: InputBorder.none,
|
||||
hintText:
|
||||
DemoLocalizations.of(context).writeYourFeedback,
|
||||
hintStyle: TextStyle(color: Colors.grey)),
|
||||
maxLength: 2000,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -101,27 +97,24 @@ class FeedbackPage extends StatelessWidget {
|
||||
),
|
||||
child: Form(
|
||||
autovalidate: true,
|
||||
child: Theme(
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextFormField(
|
||||
expands: true,
|
||||
maxLines: null,
|
||||
validator: (text) {
|
||||
model.contactWay = text;
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(
|
||||
color: isDarkNow ? Colors.grey : Colors.black),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
prefixIcon: Icon(
|
||||
Icons.contact_mail,
|
||||
color: primaryColor,
|
||||
),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).writeYourContactInfo,
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
child: TextFormField(
|
||||
expands: true,
|
||||
maxLines: null,
|
||||
validator: (text) {
|
||||
model.contactWay = text;
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(
|
||||
color: isDarkNow ? Colors.grey : Colors.black),
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
prefixIcon: Icon(
|
||||
Icons.contact_mail,
|
||||
color: primaryColor,
|
||||
),
|
||||
hintText:
|
||||
DemoLocalizations.of(context).writeYourContactInfo,
|
||||
hintStyle: TextStyle(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -56,25 +56,22 @@ class _CustomIconWidgetState extends State<CustomIconWidget> {
|
||||
width: 260,
|
||||
child: Form(
|
||||
autovalidate: true,
|
||||
child: Theme(
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextFormField(
|
||||
initialValue: widget.iconName ?? null,
|
||||
validator: (text){
|
||||
widget.onTextChange(text);
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).setIconName,
|
||||
prefixIcon: Icon(
|
||||
widget.iconData,
|
||||
color: currentIconColor,
|
||||
),
|
||||
child: TextFormField(
|
||||
initialValue: widget.iconName ?? null,
|
||||
validator: (text){
|
||||
widget.onTextChange(text);
|
||||
return null;
|
||||
},
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).setIconName,
|
||||
prefixIcon: Icon(
|
||||
widget.iconData,
|
||||
color: currentIconColor,
|
||||
),
|
||||
maxLength: 20,
|
||||
maxLines: 1,
|
||||
),
|
||||
maxLength: 20,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -31,18 +31,15 @@ class EditDialog extends StatelessWidget {
|
||||
title: Text(title ?? ""),
|
||||
content: Form(
|
||||
autovalidate: true,
|
||||
child: Theme(
|
||||
data: ThemeData(platform: TargetPlatform.android),
|
||||
child: TextFormField(
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
initialValue: initialValue ?? "",
|
||||
validator: (text) {
|
||||
if (onValueChanged != null) onValueChanged(text);
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText ?? "",
|
||||
),
|
||||
child: TextFormField(
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
initialValue: initialValue ?? "",
|
||||
validator: (text) {
|
||||
if (onValueChanged != null) onValueChanged(text);
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText ?? "",
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -26,69 +26,59 @@ class LoginWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
BottomToTopWidget(
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
platform: TargetPlatform.android,
|
||||
primaryColor: primaryColor),
|
||||
child: TextFormField(
|
||||
validator: (email) =>
|
||||
loginPageModel.logic.validatorEmail(email),
|
||||
keyboardType: TextInputType.text,
|
||||
controller: loginPageModel.emailController,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).inputEmail,
|
||||
labelText: DemoLocalizations.of(context).email,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
prefixIcon: Icon(
|
||||
Icons.email,
|
||||
child: TextFormField(
|
||||
validator: (email) =>
|
||||
loginPageModel.logic.validatorEmail(email),
|
||||
keyboardType: TextInputType.text,
|
||||
controller: loginPageModel.emailController,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).inputEmail,
|
||||
labelText: DemoLocalizations.of(context).email,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
prefixIcon: Icon(
|
||||
Icons.email,
|
||||
),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(Icons.cancel),
|
||||
onPressed: () => Future.delayed(
|
||||
Duration(milliseconds: 100),
|
||||
() => loginPageModel.emailController?.clear(),
|
||||
),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(Icons.cancel),
|
||||
onPressed: () => Future.delayed(
|
||||
Duration(milliseconds: 100),
|
||||
() => loginPageModel.emailController?.clear(),
|
||||
),
|
||||
)),
|
||||
),
|
||||
)),
|
||||
),
|
||||
index: 0,
|
||||
),
|
||||
BottomToTopWidget(
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
platform: TargetPlatform.android,
|
||||
primaryColor: primaryColor),
|
||||
child: TextFormField(
|
||||
validator: (password) =>
|
||||
loginPageModel.logic.validatePassword(password),
|
||||
controller: loginPageModel.passwordController,
|
||||
keyboardType: TextInputType.text,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).inputPassword,
|
||||
labelText: DemoLocalizations.of(context).password,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
prefixIcon: Icon(
|
||||
Icons.lock,
|
||||
),
|
||||
child: TextFormField(
|
||||
validator: (password) =>
|
||||
loginPageModel.logic.validatePassword(password),
|
||||
controller: loginPageModel.passwordController,
|
||||
keyboardType: TextInputType.text,
|
||||
textDirection: TextDirection.ltr,
|
||||
style: TextStyle(textBaseline: TextBaseline.alphabetic),
|
||||
decoration: InputDecoration(
|
||||
hintText: DemoLocalizations.of(context).inputPassword,
|
||||
labelText: DemoLocalizations.of(context).password,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
prefixIcon: Icon(
|
||||
Icons.lock,
|
||||
),
|
||||
|
||||
suffixIcon: FlatButton(
|
||||
highlightColor: primaryColorLight,
|
||||
colorBrightness: Brightness.dark,
|
||||
splashColor: Colors.grey,
|
||||
onPressed: loginPageModel.logic.onForget,
|
||||
child: Text(
|
||||
DemoLocalizations.of(context).forget,
|
||||
style: TextStyle(color: Colors.black),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
suffixIcon: FlatButton(
|
||||
highlightColor: primaryColorLight,
|
||||
colorBrightness: Brightness.dark,
|
||||
splashColor: Colors.grey,
|
||||
onPressed: loginPageModel.logic.onForget,
|
||||
child: Text(
|
||||
DemoLocalizations.of(context).forget,
|
||||
style: TextStyle(color: Colors.black),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
index: 1,
|
||||
),
|
||||
|
Reference in New Issue
Block a user