dart format
This commit is contained in:
+2
-4
@@ -159,13 +159,11 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
|||||||
data: (androidInfo) {
|
data: (androidInfo) {
|
||||||
if (androidInfo == null) {
|
if (androidInfo == null) {
|
||||||
// Not Android, always show GeckoView based on route
|
// Not Android, always show GeckoView based on route
|
||||||
return topRoute is GoRoute &&
|
return topRoute is GoRoute && topRoute.name == BrowserRoute.name;
|
||||||
topRoute.name == BrowserRoute.name;
|
|
||||||
}
|
}
|
||||||
// Android: only apply visibility fix on Android 12 and lower (API <= 31)
|
// Android: only apply visibility fix on Android 12 and lower (API <= 31)
|
||||||
if (androidInfo.sdkInt <= 31) {
|
if (androidInfo.sdkInt <= 31) {
|
||||||
return topRoute is GoRoute &&
|
return topRoute is GoRoute && topRoute.name == BrowserRoute.name;
|
||||||
topRoute.name == BrowserRoute.name;
|
|
||||||
}
|
}
|
||||||
// Android 13+: always show GeckoView
|
// Android 13+: always show GeckoView
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
+1
-3
@@ -72,9 +72,7 @@ class FontSizeBottomSheet extends ConsumerWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 16),
|
padding: const EdgeInsets.only(bottom: 16),
|
||||||
child: Card(
|
child: Card(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||||
.colorScheme
|
|
||||||
.surfaceContainerHighest,
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.all(12),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@@ -101,11 +101,16 @@ class TabDao extends DatabaseAccessor<TabDatabase> with $TabDaoMixin {
|
|||||||
..orderBy([(t) => OrderingTerm.desc(t.timestamp)]);
|
..orderBy([(t) => OrderingTerm.desc(t.timestamp)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Selectable<TabData> getContainerTabsFifo(String? containerId, {int limit = 25}) {
|
Selectable<TabData> getContainerTabsFifo(
|
||||||
|
String? containerId, {
|
||||||
|
int limit = 25,
|
||||||
|
}) {
|
||||||
return select(db.tab)
|
return select(db.tab)
|
||||||
..where((t) => containerId != null
|
..where(
|
||||||
|
(t) => containerId != null
|
||||||
? t.containerId.equals(containerId)
|
? t.containerId.equals(containerId)
|
||||||
: t.containerId.isNull())
|
: t.containerId.isNull(),
|
||||||
|
)
|
||||||
..limit(limit)
|
..limit(limit)
|
||||||
..orderBy([(t) => OrderingTerm.desc(t.timestamp)]);
|
..orderBy([(t) => OrderingTerm.desc(t.timestamp)]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,4 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum OnboardingMode {
|
enum OnboardingMode { express, detailed }
|
||||||
express,
|
|
||||||
detailed,
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ class AiConfigurationPage extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: 'Things to keep in mind\n\n',
|
text: 'Things to keep in mind\n\n',
|
||||||
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
style: Theme.of(context).textTheme.headlineSmall
|
||||||
|
?.copyWith(
|
||||||
color: Theme.of(context).colorScheme.onError,
|
color: Theme.of(context).colorScheme.onError,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ class DefaultSearchPage extends HookConsumerWidget {
|
|||||||
child: FilterChip(
|
child: FilterChip(
|
||||||
showCheckmark: false,
|
showCheckmark: false,
|
||||||
label: Text(activeBang.websiteName),
|
label: Text(activeBang.websiteName),
|
||||||
avatar: UrlIcon([activeBang.getDefaultUrl()], iconSize: 20),
|
avatar: UrlIcon([
|
||||||
|
activeBang.getDefaultUrl(),
|
||||||
|
], iconSize: 20),
|
||||||
selected: true,
|
selected: true,
|
||||||
onSelected: (value) {},
|
onSelected: (value) {},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -52,7 +52,10 @@ class ToolbarLayoutPage extends HookConsumerWidget {
|
|||||||
settings: settings,
|
settings: settings,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
compact: true,
|
compact: true,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 12.0,
|
||||||
|
vertical: 8.0,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
|
|||||||
@@ -47,7 +47,10 @@ class UBlockOptInPage extends HookConsumerWidget implements IFormPage {
|
|||||||
SvgPicture.asset('assets/images/ublock.svg'),
|
SvgPicture.asset('assets/images/ublock.svg'),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Center(
|
Center(
|
||||||
child: Text('uBlock Origin', style: theme.textTheme.headlineMedium),
|
child: Text(
|
||||||
|
'uBlock Origin',
|
||||||
|
style: theme.textTheme.headlineMedium,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
const MarkdownBody(
|
const MarkdownBody(
|
||||||
|
|||||||
@@ -59,19 +59,12 @@ class KagiCategories {
|
|||||||
|
|
||||||
final rawGroups = json['groups'] as Map<String, dynamic>;
|
final rawGroups = json['groups'] as Map<String, dynamic>;
|
||||||
final groups = rawGroups.map(
|
final groups = rawGroups.map(
|
||||||
(name, slugs) => MapEntry(
|
(name, slugs) => MapEntry(name, (slugs as List<dynamic>).cast<String>()),
|
||||||
name,
|
|
||||||
(slugs as List<dynamic>).cast<String>(),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
final rawRemap = json['remap'] as Map<String, dynamic>;
|
final rawRemap = json['remap'] as Map<String, dynamic>;
|
||||||
final remap = rawRemap.cast<String, String>();
|
final remap = rawRemap.cast<String, String>();
|
||||||
|
|
||||||
return KagiCategories(
|
return KagiCategories(categories: categories, groups: groups, remap: remap);
|
||||||
categories: categories,
|
|
||||||
groups: groups,
|
|
||||||
remap: remap,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ class BrowserPage extends ConsumerWidget {
|
|||||||
final double bottomViewportInset;
|
final double bottomViewportInset;
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
||||||
const BrowserPage({super.key, this.bottomViewportInset = 0, required this.child});
|
const BrowserPage({
|
||||||
|
super.key,
|
||||||
|
this.bottomViewportInset = 0,
|
||||||
|
required this.child,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
@@ -45,12 +49,20 @@ class BrowserPage extends ConsumerWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: -70,
|
top: -70,
|
||||||
left: -120,
|
left: -120,
|
||||||
child: _BackdropOrb(width: 400, height: 400, color: appColors.auraPurple),
|
child: _BackdropOrb(
|
||||||
|
width: 400,
|
||||||
|
height: 400,
|
||||||
|
color: appColors.auraPurple,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 220,
|
top: 220,
|
||||||
right: -150,
|
right: -150,
|
||||||
child: _BackdropOrb(width: 340, height: 340, color: appColors.auraGold),
|
child: _BackdropOrb(
|
||||||
|
width: 340,
|
||||||
|
height: 340,
|
||||||
|
color: appColors.auraGold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 18,
|
bottom: 18,
|
||||||
@@ -66,7 +78,9 @@ class BrowserPage extends ConsumerWidget {
|
|||||||
child: ClipRect(
|
child: ClipRect(
|
||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 72, sigmaY: 72),
|
filter: ImageFilter.blur(sigmaX: 72, sigmaY: 72),
|
||||||
child: ColoredBox(color: appColors.auraTint.withValues(alpha: 0.12)),
|
child: ColoredBox(
|
||||||
|
color: appColors.auraTint.withValues(alpha: 0.12),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -94,12 +108,7 @@ class BrowserPageContent extends StatelessWidget {
|
|||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
padding: EdgeInsets.fromLTRB(
|
padding: EdgeInsets.fromLTRB(24, 32, 24, 32 + bottomViewportInset),
|
||||||
24,
|
|
||||||
32,
|
|
||||||
24,
|
|
||||||
32 + bottomViewportInset,
|
|
||||||
),
|
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: math.max(
|
minHeight: math.max(
|
||||||
|
|||||||
Reference in New Issue
Block a user