chore: Halkyon Todo's scaffold joins the repository in apps/todo
Its server, client and app as `serverpod create` made them, with the switch to server-side sessions that was waiting uncommitted, as files: its one commit holds the scaffold alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
649499be23
commit
314a901fa1
1 changed files with 16151 additions and 0 deletions
61
apps/todo/halkyon_todo_flutter/lib/main.dart
Normal file
61
apps/todo/halkyon_todo_flutter/lib/main.dart
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'client.dart';
|
||||
import 'screens/greetings_screen.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await initializeClient();
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
/// Builds a theme for the given [brightness].
|
||||
ThemeData _buildTheme(Brightness brightness) {
|
||||
return ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: Colors.blue,
|
||||
brightness: brightness,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Serverpod Demo',
|
||||
theme: _buildTheme(Brightness.light),
|
||||
darkTheme: _buildTheme(Brightness.dark),
|
||||
themeMode: ThemeMode.system,
|
||||
home: const MyHomePage(title: 'Serverpod Example'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyHomePage extends StatelessWidget {
|
||||
const MyHomePage({super.key, required this.title});
|
||||
|
||||
final String title;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(title)),
|
||||
body: const GreetingsScreen(),
|
||||
// To test authentication in this example app, uncomment the line below
|
||||
// and comment out the line above. This wraps the GreetingsScreen with a
|
||||
// SignInScreen, which automatically shows a sign-in UI when the user is
|
||||
// not authenticated and displays the GreetingsScreen once they sign in.
|
||||
//
|
||||
// body: SignInScreen(
|
||||
// child: GreetingsScreen(
|
||||
// onSignOut: () async {
|
||||
// await client.auth.signOutDevice();
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue