mirror of
https://github.com/tommyxchow/frosty.git
synced 2025-08-06 17:48:14 +08:00

* Fix new lint issues * Upgrade packages and remove `device_preview` * Regenerate splash assets * Migrate to `webview_flutter` 4.0 * Upgrade to Flutter 3.10 and Dart 3 * Update Podfile * Fix video not disposing when leaving channel * Remove `tuple` package * Upgrade packages * Upgrade packages * Update podfile * Upgrade packages * Upgrade packages
39 lines
1.4 KiB
Dart
39 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:frosty/screens/onboarding/onboarding_scaffold.dart';
|
|
import 'package:frosty/screens/onboarding/onboarding_setup.dart';
|
|
import 'package:frosty/screens/settings/stores/auth_store.dart';
|
|
import 'package:frosty/widgets/app_bar.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:simple_icons/simple_icons.dart';
|
|
import 'package:webview_flutter/webview_flutter.dart';
|
|
|
|
class OnboardingLogin extends StatelessWidget {
|
|
const OnboardingLogin({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final authStore = context.read<AuthStore>();
|
|
|
|
return OnboardingScaffold(
|
|
header: 'Log in',
|
|
subtitle:
|
|
'Frosty needs your permission in order to enable the ability to chat, view followed streams, and more.',
|
|
disclaimer:
|
|
'Frosty only asks for the necessary permissions through the official Twitch API. You\'ll be able to review them before authorizing.',
|
|
buttonText: 'Connect with Twitch',
|
|
buttonIcon: const Icon(SimpleIcons.twitch),
|
|
skipRoute: const OnboardingSetup(),
|
|
route: Scaffold(
|
|
appBar: const FrostyAppBar(
|
|
title: Text('Connect with Twitch'),
|
|
),
|
|
body: WebViewWidget(
|
|
controller: authStore.createAuthWebViewController(
|
|
routeAfter: const OnboardingSetup(),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|