Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

Commit

Permalink
style(settings): reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
CCXXXI committed Oct 31, 2021
1 parent 3e35c54 commit 9f88445
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions lib/settings/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,35 @@ class SettingsPage extends StatelessWidget {
trailing: const Text(version),
onTap: Url.version(version).launch,
),
Obx(() => ListTile(
title: const Text('最新版本'),
trailing: logic.latestVer.value == null
? Loading()
: logic.latestVer.value!.isEmpty
? IconButton(
onPressed: logic.updateVerInfo,
icon: const FaIcon(FontAwesomeIcons.redo),
)
: Badge(
child: Text(logic.latestVer.value!),
badgeContent: FaIcon(
logic.updateAvailable
? FontAwesomeIcons.exclamation
: FontAwesomeIcons.check,
size: 16,
),
badgeColor: logic.updateAvailable
? Colors.orange
: Colors.green,
position: BadgePosition.topStart(
top: -4, start: -32),
Obx(
() => ListTile(
title: const Text('最新版本'),
trailing: logic.latestVer.value == null
? Loading()
: logic.latestVer.value!.isEmpty
? IconButton(
onPressed: logic.updateVerInfo,
icon: const FaIcon(FontAwesomeIcons.redo),
)
: Badge(
child: Text(logic.latestVer.value!),
badgeContent: FaIcon(
logic.updateAvailable
? FontAwesomeIcons.exclamation
: FontAwesomeIcons.check,
size: 16,
),
onTap: Url.latest.launch,
)),
badgeColor: logic.updateAvailable
? Colors.orange
: Colors.green,
position: BadgePosition.topStart(
top: -4,
start: -32,
),
),
onTap: Url.latest.launch,
),
),
ListTile(
title: const Text('反馈'),
trailing: const FaIcon(FontAwesomeIcons.github),
Expand Down

0 comments on commit 9f88445

Please sign in to comment.