monet colors :trollface:

This commit is contained in:
Jan 2022-12-29 19:41:45 +01:00
parent 3a8fdd27ad
commit 3f8599a3e9
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
8 changed files with 38 additions and 12 deletions

View file

@ -1,5 +1,6 @@
import 'package:feet/widgets/login_prompt.dart';
import 'package:flutter/material.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'api/api.dart';
void main() {
@ -13,18 +14,22 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
return DynamicColorBuilder(
builder: ((lightDynamic, darkDynamic) => MaterialApp(
title: 'Feet',
theme: ThemeData(
brightness: Brightness.light,
useMaterial3: true,
colorScheme: lightDynamic,
),
darkTheme: ThemeData(
brightness: Brightness.dark,
useMaterial3: true,
colorScheme: darkDynamic,
),
themeMode: ThemeMode.system,
home: MyHomePage(title: 'Feet', api: api),
)),
);
}
}

View file

@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
}

View file

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

View file

@ -5,6 +5,8 @@
import FlutterMacOS
import Foundation
import dynamic_color
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
}

View file

@ -57,6 +57,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
dynamic_color:
dependency: "direct main"
description:
name: dynamic_color
sha256: "37a15576f5a0bfd5555b613cf20ea3bd379607cf88d457374a16032f4e942174"
url: "https://pub.dev"
source: hosted
version: "1.5.4"
fake_async:
dependency: transitive
description:
@ -218,3 +226,4 @@ packages:
version: "2.1.4"
sdks:
dart: ">=2.19.0-444.2.beta <4.0.0"
flutter: ">=3.3.0"

View file

@ -37,6 +37,7 @@ dependencies:
cupertino_icons: ^1.0.2
http: ^0.13.5
crypto: ^3.0.2
dynamic_color: ^1.5.4
dev_dependencies:
flutter_test:

View file

@ -6,6 +6,9 @@
#include "generated_plugin_registrant.h"
#include <dynamic_color/dynamic_color_plugin_c_api.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
DynamicColorPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
}

View file

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
dynamic_color
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST