mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
remove fixed colors
This commit is contained in:
@ -3,16 +3,12 @@ import 'package:google_fonts/google_fonts.dart';
|
|||||||
|
|
||||||
final kColorTransparent = MaterialStateProperty.all<Color>(Colors.transparent);
|
final kColorTransparent = MaterialStateProperty.all<Color>(Colors.transparent);
|
||||||
const kColorBg = Colors.white;
|
const kColorBg = Colors.white;
|
||||||
final kColorGrey50 = Colors.grey.shade50;
|
|
||||||
final kColorGrey100 = Colors.grey.shade100;
|
final kColorGrey100 = Colors.grey.shade100;
|
||||||
final kColorGrey200 = Colors.grey.shade200;
|
|
||||||
final kColorGrey300 = Colors.grey.shade300;
|
|
||||||
final kColorGrey400 = Colors.grey.shade400;
|
|
||||||
final kColorGrey500 = Colors.grey.shade500;
|
final kColorGrey500 = Colors.grey.shade500;
|
||||||
final kColorErrorMsg = kColorGrey500;
|
|
||||||
|
|
||||||
final kCodeStyle = GoogleFonts.sourceCodePro();
|
final kCodeStyle = GoogleFonts.sourceCodePro();
|
||||||
final kCodeHintStyle = kCodeStyle.copyWith(color: kColorGrey500);
|
final kCodeHintStyle = kCodeStyle.copyWith(color: kColorGrey500);
|
||||||
|
const kHintOpacity = 0.6;
|
||||||
|
|
||||||
const kTextStyleButton = TextStyle(fontWeight: FontWeight.bold);
|
const kTextStyleButton = TextStyle(fontWeight: FontWeight.bold);
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ class App extends StatelessWidget {
|
|||||||
fontFamily: GoogleFonts.openSans().fontFamily,
|
fontFamily: GoogleFonts.openSans().fontFamily,
|
||||||
colorSchemeSeed: Colors.blue,
|
colorSchemeSeed: Colors.blue,
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
|
brightness: Brightness.light,
|
||||||
),
|
),
|
||||||
home: const HomePage(),
|
home: const HomePage(),
|
||||||
);
|
);
|
||||||
|
@ -35,8 +35,10 @@ class _EditorPaneRequestDetailsCardState
|
|||||||
data: MultiSplitViewThemeData(
|
data: MultiSplitViewThemeData(
|
||||||
dividerThickness: 3,
|
dividerThickness: 3,
|
||||||
dividerPainter: DividerPainters.background(
|
dividerPainter: DividerPainters.background(
|
||||||
color: kColorGrey200,
|
color: Theme.of(context).colorScheme.surfaceVariant,
|
||||||
highlightedColor: kColorGrey400,
|
highlightedColor: Theme.of(context).colorScheme.outline.withOpacity(
|
||||||
|
kHintOpacity,
|
||||||
|
),
|
||||||
animationEnabled: false,
|
animationEnabled: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -71,14 +71,14 @@ class _DropdownButtonHTTPMethodState
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Color color = Theme.of(context).colorScheme.surface;
|
final surfaceColor = Theme.of(context).colorScheme.surface;
|
||||||
final activeId = ref.watch(activeIdStateProvider);
|
final activeId = ref.watch(activeIdStateProvider);
|
||||||
final collection = ref.read(collectionStateNotifierProvider);
|
final collection = ref.read(collectionStateNotifierProvider);
|
||||||
final idIdx = collection.indexWhere((m) => m.id == activeId);
|
final idIdx = collection.indexWhere((m) => m.id == activeId);
|
||||||
final method = ref.watch(
|
final method = ref.watch(
|
||||||
collectionStateNotifierProvider.select((value) => value[idIdx].method));
|
collectionStateNotifierProvider.select((value) => value[idIdx].method));
|
||||||
return DropdownButton<HTTPVerb>(
|
return DropdownButton<HTTPVerb>(
|
||||||
focusColor: color,
|
focusColor: surfaceColor,
|
||||||
value: method,
|
value: method,
|
||||||
icon: const Icon(Icons.unfold_more_rounded),
|
icon: const Icon(Icons.unfold_more_rounded),
|
||||||
elevation: 4,
|
elevation: 4,
|
||||||
@ -136,7 +136,11 @@ class _URLTextFieldState extends ConsumerState<URLTextField> {
|
|||||||
style: kCodeStyle,
|
style: kCodeStyle,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "Enter API endpoint like api.foss42.com/country/codes",
|
hintText: "Enter API endpoint like api.foss42.com/country/codes",
|
||||||
hintStyle: kCodeHintStyle,
|
hintStyle: kCodeStyle.copyWith(
|
||||||
|
color: Theme.of(context).colorScheme.outline.withOpacity(
|
||||||
|
kHintOpacity,
|
||||||
|
),
|
||||||
|
),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
@ -32,10 +32,13 @@ class HomePageState extends State<HomePage> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: MultiSplitViewTheme(
|
child: MultiSplitViewTheme(
|
||||||
data: MultiSplitViewThemeData(
|
data: MultiSplitViewThemeData(
|
||||||
dividerThickness: 4,
|
dividerThickness: 3,
|
||||||
dividerPainter: DividerPainters.background(
|
dividerPainter: DividerPainters.background(
|
||||||
color: kColorGrey200,
|
color: Theme.of(context).colorScheme.surfaceVariant,
|
||||||
highlightedColor: kColorGrey400,
|
highlightedColor:
|
||||||
|
Theme.of(context).colorScheme.outline.withOpacity(
|
||||||
|
kHintOpacity,
|
||||||
|
),
|
||||||
animationEnabled: false,
|
animationEnabled: false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user