update onboarding; add missing safe areas

This commit is contained in:
Fabian Freund
2026-03-17 08:46:09 +01:00
parent 79b68f137e
commit 25f4d27f0d
49 changed files with 3938 additions and 2430 deletions
@@ -25,6 +25,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:weblibre/features/geckoview/features/browser/domain/services/browser_addon.dart';
import 'package:weblibre/features/onboarding/presentation/pages/abstract/i_form_page.dart';
import 'package:weblibre/presentation/widgets/browser_page.dart';
class UBlockOptInPage extends HookConsumerWidget implements IFormPage {
@override
@@ -36,50 +37,52 @@ class UBlockOptInPage extends HookConsumerWidget implements IFormPage {
Widget build(BuildContext context, WidgetRef ref) {
final theme = Theme.of(context);
return Form(
key: formKey,
child: ListView(
children: [
const SizedBox(height: 24),
SvgPicture.asset('assets/images/ublock.svg'),
const SizedBox(height: 8),
Center(
child: Text('uBlock Origin', style: theme.textTheme.headlineMedium),
),
const SizedBox(height: 24),
const Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0),
child: MarkdownBody(
data: '''
return BrowserPage(
child: BrowserPageContent(
child: Form(
key: formKey,
child: Column(
children: [
const SizedBox(height: 24),
SvgPicture.asset('assets/images/ublock.svg'),
const SizedBox(height: 8),
Center(
child: Text('uBlock Origin', style: theme.textTheme.headlineMedium),
),
const SizedBox(height: 24),
const MarkdownBody(
data: '''
uBlock Origin (uBO) is a CPU and memory-efficient **wide-spectrum content blocker** by **Raymond Hill** and available as a browser extensions for WebLibre.
It blocks ads, trackers, coin miners, popups, annoying anti-blockers, malware sites, etc., by default using **EasyList, EasyPrivacy, Peter Lowe's Blocklist, Online Malicious URL Blocklist, and uBO filter lists**.
It blocks ads, trackers, coin miners, popups, annoying anti-blockers, malware sites, etc., by default using **EasyList, EasyPrivacy, Peter Lowe's Blocklist, Online Malicious URL Blocklist, and uBO filter lists**.
There are many other lists available to block even more.
''',
),
),
const SizedBox(height: 24),
FormField(
initialValue: true,
onSaved: (newValue) {
if (newValue == true) {
unawaited(
ref
.read(browserAddonServiceProvider.notifier)
.install('uBlock0@raymondhill.net'),
);
}
},
builder: (field) => SwitchListTile(
contentPadding: EdgeInsets.zero,
value: field.value ?? false,
title: const Text('Install uBlock Origin Extension'),
onChanged: (value) {
field.didChange(value);
},
),
),
],
),
const SizedBox(height: 24),
FormField(
initialValue: true,
onSaved: (newValue) {
if (newValue == true) {
unawaited(
ref
.read(browserAddonServiceProvider.notifier)
.install('uBlock0@raymondhill.net'),
);
}
},
builder: (field) => SwitchListTile(
value: field.value ?? false,
title: const Text('Install uBlock Origin Extension'),
onChanged: (value) {
field.didChange(value);
},
),
),
],
),
),
);
}