Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Widget _buildCustomColor(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '保密文档',
textColor: TTheme.of(context).errorNormalColor,
opacity: 0.2,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Widget _buildCustomGap(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '密集',
gapX: 60,
gapY: 40,
textSize: 12,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Widget _buildCustomRotate(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '旋转45度',
rotate: -45,
gapX: 150,
gapY: 100,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Widget _buildCustomSize(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '大字体水印',
textSize: 24,
fontWeight: FontWeight.bold,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

Widget _buildFormWatermark(BuildContext context) {
return Container(
height: 350,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '草稿',
opacity: 0.08,
textSize: 48,
child: Padding(
padding: const EdgeInsets.all(16),
child: Column(
children: [
TInput(
leftLabel: '姓名',
hintText: '请输入姓名',
),
const SizedBox(height: 16),
TInput(
leftLabel: '邮箱',
hintText: '请输入邮箱',
),
const SizedBox(height: 16),
TInput(
leftLabel: '电话',
hintText: '请输入电话号码',
),
const SizedBox(height: 16),
TButton(
text: '提交',
theme: TButtonTheme.primary,
onTap: () {},
),
],
),
),
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

Widget _buildGridLayout(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: 'TDesign',
layout: TWatermarkLayout.grid,
gapX: 120,
gapY: 80,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Widget _buildHorizontalLayout(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '内部资料',
layout: TWatermarkLayout.horizontal,
gapX: 150,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Widget _buildImageWatermark(BuildContext context) {
return Container(
height: 300,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '仅供查看',
child: Center(
child: Container(
width: 200,
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).brandFocusColor,
borderRadius: BorderRadius.circular(8),
),
child: Icon(
TIcons.image,
size: 80,
color: TTheme.of(context).brandNormalColor,
),
),
),
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

Widget _buildListWatermark(BuildContext context) {
return Container(
height: 300,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '内部数据',
opacity: 0.1,
child: ListView.builder(
itemCount: 10,
itemBuilder: (context, index) {
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: TTheme.of(context).componentStrokeColor,
width: 0.5,
),
),
),
child: Row(
children: [
CircleAvatar(
backgroundColor: TTheme.of(context).brandLightColor,
child: Text('${index + 1}'),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TText(
'列表项 ${index + 1}',
font: TTheme.of(context).fontBodyMedium,
),
const SizedBox(height: 4),
TText(
'这是第 ${index + 1} 条数据的描述信息',
font: TTheme.of(context).fontBodySmall,
textColor: TTheme.of(context).textColorSecondary,
),
],
),
),
],
),
);
},
),
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Widget _buildMultiLine(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: 'TDesign\nFlutter',
type: TWatermarkType.multiLine,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Widget _buildSingleLine(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: 'TDesign Flutter',
type: TWatermarkType.singleLine,
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Widget _buildVerticalLayout(BuildContext context) {
return Container(
height: 200,
decoration: BoxDecoration(
color: TTheme.of(context).bgColorContainer,
borderRadius: BorderRadius.circular(8),
),
child: TWatermark(
text: '机密',
layout: TWatermarkLayout.vertical,
gapY: 80,
),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
<string>13.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion tdesign-component/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
13 changes: 10 additions & 3 deletions tdesign-component/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,28 @@ PODS:
- Flutter (1.0.0)
- image_picker_ios (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
image_picker_ios: e0ece4aa2a75771a7de3fa735d26d90817041326
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb

PODFILE CHECKSUM: cf0c950f7e9a456b4e325f5b8fc0f98906a3705a
PODFILE CHECKSUM: 53026eaf67b63baa2e316e457f9701dbdf33f41a

COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -438,7 +438,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -487,7 +487,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Loading
Loading