|
...
|
...
|
@@ -60,19 +60,19 @@ class CreateWatchThemeView extends GetView<CreateWatchThemeController> { |
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
physics: const AlwaysScrollableScrollPhysics(),
|
|
|
|
padding: EdgeInsets.only(bottom: 28.dp),
|
|
|
|
padding: EdgeInsets.only(bottom: 28),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
SizedBox(height: 12.dp),
|
|
|
|
SizedBox(height: 12),
|
|
|
|
WatchFacePreview(
|
|
|
|
faceAsset:
|
|
|
|
R.assetsImagesWatchThemeCustomFaceCreate,
|
|
|
|
),
|
|
|
|
SizedBox(height: 20.dp),
|
|
|
|
SizedBox(height: 20),
|
|
|
|
_EditorCard(controller: controller),
|
|
|
|
SizedBox(height: 26.dp),
|
|
|
|
SizedBox(height: 26),
|
|
|
|
_AgreementRow(controller: controller),
|
|
|
|
SizedBox(height: 18.dp),
|
|
|
|
SizedBox(height: 18),
|
|
|
|
_SaveButton(controller: controller),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -104,11 +104,11 @@ class _EditorCard extends StatelessWidget { |
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16.dp),
|
|
|
|
padding: EdgeInsets.fromLTRB(20.dp, 20.dp, 20.dp, 20.dp),
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
padding: EdgeInsets.fromLTRB(20, 20, 20, 20),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.circular(16.dp),
|
|
|
|
borderRadius: BorderRadius.circular(16),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
...
|
...
|
@@ -117,19 +117,19 @@ class _EditorCard extends StatelessWidget { |
|
|
|
'自定义主题',
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textPrimary,
|
|
|
|
fontSize: 16.dp,
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 4.dp),
|
|
|
|
SizedBox(height: 4),
|
|
|
|
Text(
|
|
|
|
'支持上传图片、视频、Live图、Gif、最长5秒',
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textSecondary,
|
|
|
|
fontSize: 12.dp,
|
|
|
|
fontSize: 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 14.dp),
|
|
|
|
SizedBox(height: 14),
|
|
|
|
GridView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
padding: EdgeInsets.zero,
|
|
...
|
...
|
@@ -137,9 +137,9 @@ class _EditorCard extends StatelessWidget { |
|
|
|
itemCount: 4,
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 2,
|
|
|
|
crossAxisSpacing: 23.dp,
|
|
|
|
mainAxisSpacing: 14.dp,
|
|
|
|
mainAxisExtent: 170.dp,
|
|
|
|
crossAxisSpacing: 23,
|
|
|
|
mainAxisSpacing: 14,
|
|
|
|
mainAxisExtent: 170,
|
|
|
|
),
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return Obx(
|
|
...
|
...
|
@@ -154,22 +154,22 @@ class _EditorCard extends StatelessWidget { |
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
SizedBox(height: 14.dp),
|
|
|
|
SizedBox(height: 14),
|
|
|
|
Text(
|
|
|
|
'主题名称',
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textPrimary,
|
|
|
|
fontSize: 16.dp,
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 14.dp),
|
|
|
|
SizedBox(height: 14),
|
|
|
|
Container(
|
|
|
|
height: 52.dp,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 26.dp),
|
|
|
|
height: 52,
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 26),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: WatchThemeColors.background,
|
|
|
|
borderRadius: BorderRadius.circular(16.dp),
|
|
|
|
borderRadius: BorderRadius.circular(16),
|
|
|
|
),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: TextField(
|
|
...
|
...
|
@@ -180,14 +180,14 @@ class _EditorCard extends StatelessWidget { |
|
|
|
hintText: '最多10个字符',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: WatchThemeColors.textTertiary,
|
|
|
|
fontSize: 14.dp,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
border: InputBorder.none,
|
|
|
|
isCollapsed: true,
|
|
|
|
),
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textPrimary,
|
|
|
|
fontSize: 14.dp,
|
|
|
|
fontSize: 14,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -222,19 +222,19 @@ class _UploadTile extends StatelessWidget { |
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
|
onTap: onPick,
|
|
|
|
child: Container(
|
|
|
|
width: 140.dp,
|
|
|
|
height: 140.dp,
|
|
|
|
width: 140,
|
|
|
|
height: 140,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: WatchThemeColors.background,
|
|
|
|
borderRadius: BorderRadius.circular(18.667.dp),
|
|
|
|
borderRadius: BorderRadius.circular(18.667),
|
|
|
|
),
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
child: path == null
|
|
|
|
? Icon(Icons.add, size: 34.dp, color: color)
|
|
|
|
? Icon(Icons.add, size: 34, color: color)
|
|
|
|
: Image.file(File(path!), fit: BoxFit.cover),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 10.dp),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
GestureDetector(
|
|
|
|
onTap: onRename,
|
|
|
|
child:
|
|
...
|
...
|
@@ -245,14 +245,14 @@ class _UploadTile extends StatelessWidget { |
|
|
|
label,
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textPrimary,
|
|
|
|
fontSize: 12.dp,
|
|
|
|
fontSize: 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(width: 4.dp),
|
|
|
|
SizedBox(width: 4),
|
|
|
|
Icon(
|
|
|
|
Icons.edit_outlined,
|
|
|
|
color: const Color(0xFFA084EF),
|
|
|
|
size: 14.dp,
|
|
|
|
size: 14,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -277,25 +277,25 @@ class _AgreementRow extends StatelessWidget { |
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
width: 16.dp,
|
|
|
|
height: 16.dp,
|
|
|
|
width: 16,
|
|
|
|
height: 16,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: controller.agreedToSubmission.value
|
|
|
|
? WatchThemeColors.brand
|
|
|
|
: Colors.transparent,
|
|
|
|
border: Border.all(color: WatchThemeColors.brand, width: 1.dp),
|
|
|
|
border: Border.all(color: WatchThemeColors.brand, width: 1),
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
),
|
|
|
|
child: controller.agreedToSubmission.value
|
|
|
|
? Icon(Icons.check, color: Colors.white, size: 12.dp)
|
|
|
|
? Icon(Icons.check, color: Colors.white, size: 12)
|
|
|
|
: null,
|
|
|
|
),
|
|
|
|
SizedBox(width: 4.dp),
|
|
|
|
SizedBox(width: 4),
|
|
|
|
Text(
|
|
|
|
'我已阅读并同意用户投稿协议',
|
|
|
|
style: TextStyle(
|
|
|
|
color: WatchThemeColors.textSecondary,
|
|
|
|
fontSize: 12.dp,
|
|
|
|
fontSize: 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
...
|
...
|
@@ -320,18 +320,18 @@ class _SaveButton extends StatelessWidget { |
|
|
|
child: GestureDetector(
|
|
|
|
onTap: enabled ? () => controller.saveCustomTheme() : null,
|
|
|
|
child: Container(
|
|
|
|
width: 280.dp,
|
|
|
|
height: 48.dp,
|
|
|
|
width: 280,
|
|
|
|
height: 48,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: WatchThemeColors.brand,
|
|
|
|
borderRadius: BorderRadius.circular(24.dp),
|
|
|
|
borderRadius: BorderRadius.circular(24),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
controller.isSaving.value ? '保存中' : '保存主题',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 16.dp,
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
...
|
...
|
|