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 9f88445 commit cba3257
Showing 1 changed file with 54 additions and 53 deletions.
107 changes: 54 additions & 53 deletions lib/settings/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,63 +94,64 @@ class SettingsPage extends StatelessWidget {
],
),
SettingsGroup(
title: '关于',
children: ListTile.divideTiles(
context: context,
tiles: [
ListTile(
title: const Text('当前版本'),
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,
),
title: '关于',
children: ListTile.divideTiles(
context: context,
tiles: [
ListTile(
title: const Text('当前版本'),
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,
),
onTap: Url.latest.launch,
),
),
ListTile(
title: const Text('反馈'),
trailing: const FaIcon(FontAwesomeIcons.github),
onTap: Url.issues.launch,
badgeColor: logic.updateAvailable
? Colors.orange
: Colors.green,
position: BadgePosition.topStart(
top: -4,
start: -32,
),
),
onTap: Url.latest.launch,
),
AboutListTile(
applicationIcon: const Image(
image: ResizeImage(
AssetImage('assets/images/app_icon.png'),
width: 42,
),
width: 42, // fix bug on web
),
ListTile(
title: const Text('反馈'),
trailing: const FaIcon(FontAwesomeIcons.github),
onTap: Url.issues.launch,
),
AboutListTile(
applicationIcon: const Image(
image: ResizeImage(
AssetImage('assets/images/app_icon.png'),
width: 42,
),
applicationLegalese: license,
applicationVersion: release,
child: const Text('许可协议'),
width: 42, // fix bug on web
),
],
).toList()),
applicationLegalese: license,
applicationVersion: release,
child: const Text('许可协议'),
),
],
).toList(),
),
const Divider(),
ListTile(
leading: const FaIcon(FontAwesomeIcons.lightbulb),
Expand Down

0 comments on commit cba3257

Please sign in to comment.