mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-07-01 11:52:00 +08:00
Init
This commit is contained in:
37
lib/widgets/src/blur_oval_widget.dart
Normal file
37
lib/widgets/src/blur_oval_widget.dart
Normal file
@ -0,0 +1,37 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BlurOvalWidget extends StatelessWidget {
|
||||
final Widget child;
|
||||
final double padding;
|
||||
final Color blurColor;
|
||||
final BorderRadius borderRadius;
|
||||
final ImageFilter? imageFilter;
|
||||
|
||||
const BlurOvalWidget(
|
||||
{super.key,
|
||||
required this.child,
|
||||
this.padding = 0,
|
||||
this.blurColor = Colors.white10,
|
||||
this.borderRadius = BorderRadius.zero,
|
||||
this.imageFilter});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipRRect(
|
||||
borderRadius: borderRadius,
|
||||
child: BackdropFilter(
|
||||
filter: imageFilter ??
|
||||
ImageFilter.blur(
|
||||
sigmaX: 10,
|
||||
sigmaY: 10,
|
||||
),
|
||||
child: Container(
|
||||
color: blurColor,
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:starcitizen_doctor/generated/l10n.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
import 'package:markdown_widget/config/all.dart';
|
||||
import 'package:markdown_widget/widget/all.dart';
|
||||
import 'package:extended_image/extended_image.dart';
|
||||
@ -43,28 +42,24 @@ Widget makeDefaultPage(BuildContext context,
|
||||
return NavigationView(
|
||||
appBar: NavigationAppBar(
|
||||
automaticallyImplyLeading: automaticallyImplyLeading,
|
||||
title: DragToMoveArea(
|
||||
child: titleRow ??
|
||||
Column(
|
||||
title: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
Text(title),
|
||||
],
|
||||
),
|
||||
)
|
||||
Text(title),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
actions: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [...?actions, const WindowButtons()],
|
||||
children: [...?actions],
|
||||
)),
|
||||
content: useBodyContainer
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
color: FluentTheme.of(context).scaffoldBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(9),
|
||||
),
|
||||
child: content,
|
||||
@ -73,23 +68,6 @@ Widget makeDefaultPage(BuildContext context,
|
||||
);
|
||||
}
|
||||
|
||||
class WindowButtons extends StatelessWidget {
|
||||
const WindowButtons({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final FluentThemeData theme = FluentTheme.of(context);
|
||||
return SizedBox(
|
||||
width: 138,
|
||||
height: 50,
|
||||
child: WindowCaption(
|
||||
brightness: theme.brightness,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
List<Widget> makeMarkdownView(String description, {String? attachmentsUrl}) {
|
||||
return MarkdownGenerator().buildWidgets(description,
|
||||
config: MarkdownConfig(configs: [
|
||||
|
Reference in New Issue
Block a user