Skip to content

Commit

Permalink
adjust ui to fit 6 buttons at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyBest318 committed Mar 3, 2024
1 parent 04920fc commit c687a90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/tony/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/tony/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-03-03 14:53:28.435744","version":"3.19.2"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.1/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.5/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/tony/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/tony/.pub-cache/hosted/pub.dev/path_provider_windows-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/tony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.3.0/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-03-03 15:50:36.130902","version":"3.19.2"}
30 changes: 30 additions & 0 deletions lib/widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
setState(() {});
},
child: const Text("开始"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
ElevatedButton(
onPressed: (isSessionStarted)
Expand All @@ -594,6 +599,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
}
: null,
child: const Text("⬅️"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
ElevatedButton(
onPressed: (widget.timer.isRunning ||
Expand All @@ -613,6 +623,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
}
: null,
child: const Text("计次"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
ElevatedButton(
onPressed: (widget.timer.isRunning ||
Expand All @@ -629,6 +644,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
}
: null,
child: const Text("放弃"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
ElevatedButton(
onPressed: (widget.selectedTimelineDuration == null ||
Expand All @@ -649,6 +669,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
}
},
child: const Text("删除"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
ElevatedButton(
onPressed: () async {
Expand All @@ -662,6 +687,11 @@ class StopwatchTimelineState extends State<StopwatchTimeline> {
}
},
child: const Text("重置"),
style: ElevatedButton.styleFrom(
minimumSize: Size.zero, // Set this
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 10.0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16.0)),
),
),
],
),
Expand Down

0 comments on commit c687a90

Please sign in to comment.