Optimize android's Gradle settings and clean up mobile source code ()

* optimize android side gradle settings

* android minsdk back to 21

* remove unused package, update linter and fix lint error
This commit is contained in:
xpwmaosldk 2022-06-22 14:23:35 +09:00 committed by GitHub
parent 63bebd92e0
commit caaa474c23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 524 additions and 333 deletions
mobile/lib/shared/views

View file

@ -12,8 +12,9 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
void goToReleaseNote() async {
final Uri _url = Uri.parse('https://github.com/alextran1502/immich/releases/latest');
await launchUrl(_url);
final Uri url =
Uri.parse('https://github.com/alextran1502/immich/releases/latest');
await launchUrl(url);
}
void onAcknowledgeTapped() {
@ -21,7 +22,8 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
}
return ValueListenableBuilder<bool>(
valueListenable: VersionAnnouncementOverlayController.appLoader.loaderShowingNotifier,
valueListenable:
VersionAnnouncementOverlayController.appLoader.loaderShowingNotifier,
builder: (context, shouldShow, child) {
if (shouldShow) {
return Scaffold(
@ -51,10 +53,14 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
child: RichText(
text: TextSpan(
style: const TextStyle(
fontSize: 14, fontFamily: 'WorkSans', color: Colors.black87, height: 1.2),
fontSize: 14,
fontFamily: 'WorkSans',
color: Colors.black87,
height: 1.2),
children: <TextSpan>[
const TextSpan(
text: 'Hi friend, there is a new release of',
text:
'Hi friend, there is a new release of',
),
const TextSpan(
text: ' Immich ',
@ -65,14 +71,16 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
),
),
const TextSpan(
text: "please take your time to visit the ",
text:
"please take your time to visit the ",
),
TextSpan(
text: "release note",
style: const TextStyle(
decoration: TextDecoration.underline,
),
recognizer: TapGestureRecognizer()..onTap = goToReleaseNote,
recognizer: TapGestureRecognizer()
..onTap = goToReleaseNote,
),
const TextSpan(
text:
@ -91,7 +99,8 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
primary: Colors.indigo,
onPrimary: Colors.grey[50],
elevation: 2,
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
padding: const EdgeInsets.symmetric(
vertical: 10, horizontal: 25),
),
onPressed: onAcknowledgeTapped,
child: const Text(
@ -119,7 +128,8 @@ class VersionAnnouncementOverlay extends HookConsumerWidget {
}
class VersionAnnouncementOverlayController {
static final VersionAnnouncementOverlayController appLoader = VersionAnnouncementOverlayController();
static final VersionAnnouncementOverlayController appLoader =
VersionAnnouncementOverlayController();
ValueNotifier<bool> loaderShowingNotifier = ValueNotifier(false);
ValueNotifier<String> loaderTextNotifier = ValueNotifier('error message');