The Gemma model requires Kaggle login/licence so direct HTTP download is not possible. Replaces the download screen with adb transfer instructions, a Scan button that checks the file on disk, and a Continue without AI bypass. Also renames the Android package from com.example.dailyou to net.stefwill.dailyou (build.gradle.kts, MainActivity.kt path + declaration) and adds *.bin to .gitignore to keep model files out of the repo.
50 lines
1.5 KiB
Dart
50 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'core/providers/model_download_provider.dart';
|
|
import 'features/model_download/model_download_screen.dart';
|
|
import 'shell.dart';
|
|
|
|
class App extends ConsumerWidget {
|
|
const App({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final skipped = ref.watch(modelSkippedProvider);
|
|
final modelPresentAsync = ref.watch(modelPresentProvider);
|
|
|
|
return MaterialApp(
|
|
title: 'DailyYou',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: _lightTheme(),
|
|
darkTheme: _darkTheme(),
|
|
themeMode: ThemeMode.system,
|
|
home: skipped
|
|
? const AppShell()
|
|
: modelPresentAsync.when(
|
|
data: (present) =>
|
|
present ? const AppShell() : const ModelDownloadScreen(),
|
|
loading: () => const Scaffold(
|
|
body: Center(child: CircularProgressIndicator()),
|
|
),
|
|
error: (_, __) => const ModelDownloadScreen(),
|
|
),
|
|
);
|
|
}
|
|
|
|
ThemeData _lightTheme() => ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF6B8CFF),
|
|
brightness: Brightness.light,
|
|
),
|
|
);
|
|
|
|
ThemeData _darkTheme() => ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF6B8CFF),
|
|
brightness: Brightness.dark,
|
|
),
|
|
);
|
|
}
|