Files
frosty/lib/screens/onboarding/onboarding_login.dart
Tommy 9bfcd49037 Upgrade Flutter/Dart and dependencies (#265)
* 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
2023-05-30 21:10:04 -04:00

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(),
),
),
),
);
}
}