Comments (3)
same here
3.16.5 Flutter SDK
from flutter-neumorphic.
i don't know if this is the same author but https://pub.dev/packages/flutter_neumorphic_plus
from flutter-neumorphic.
Fix, temp work around
'''
import 'package:flutter/material.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';
class NeumorphicApp extends StatelessWidget {
final String title;
final ThemeMode themeMode;
final NeumorphicThemeData theme;
final NeumorphicThemeData darkTheme;
final ThemeData? materialDarkTheme;
final ThemeData? materialTheme;
final String? initialRoute;
final Color? color;
final Iterable<LocalizationsDelegate>? localizationsDelegates;
final Locale? locale;
final Widget? home;
final Iterable supportedLocales;
final Map<String, WidgetBuilder> routes;
final RouteFactory? onGenerateRoute;
final RouteFactory? onUnknownRoute;
final GenerateAppTitle? onGenerateTitle;
final GlobalKey? navigatorKey;
final List navigatorObservers;
final InitialRouteListFactory? onGenerateInitialRoutes;
final bool debugShowCheckedModeBanner;
final Widget Function(BuildContext, Widget?)? builder;
final Locale? Function(Locale?, Iterable)? localeResolutionCallback;
final ThemeData? highContrastTheme;
final ThemeData? highContrastDarkTheme;
final LocaleListResolutionCallback? localeListResolutionCallback;
final bool showPerformanceOverlay;
final bool checkerboardRasterCacheImages;
final bool checkerboardOffscreenLayers;
final bool showSemanticsDebugger;
final Map<LogicalKeySet, Intent>? shortcuts;
final Map<Type, Action>? actions;
final bool debugShowMaterialGrid;
const NeumorphicApp({
Key? key,
this.title = '',
this.color,
this.initialRoute,
this.routes = const {},
this.home,
this.debugShowCheckedModeBanner = true,
this.navigatorKey,
this.navigatorObservers = const [],
this.onGenerateRoute,
this.onGenerateTitle,
this.onGenerateInitialRoutes,
this.onUnknownRoute,
this.theme = neumorphicDefaultTheme,
this.darkTheme = neumorphicDefaultDarkTheme,
this.locale,
this.localizationsDelegates,
this.supportedLocales = const [Locale('en', 'US')],
this.themeMode = ThemeMode.system,
this.materialDarkTheme,
this.materialTheme,
this.builder,
this.localeResolutionCallback,
this.highContrastTheme,
this.highContrastDarkTheme,
this.localeListResolutionCallback,
this.showPerformanceOverlay = false,
this.checkerboardRasterCacheImages = false,
this.checkerboardOffscreenLayers = false,
this.showSemanticsDebugger = false,
this.debugShowMaterialGrid = false,
this.shortcuts,
this.actions,
}) : super(key: key);
ThemeData _getMaterialTheme(NeumorphicThemeData theme) {
final color = theme.accentColor;
if (color is MaterialColor) {
return ThemeData(
primarySwatch: color,
textTheme: theme.textTheme,
iconTheme: theme.iconTheme,
scaffoldBackgroundColor: theme.baseColor,
);
}
return ThemeData(
primaryColor: theme.accentColor,
primarySwatch: MaterialColor(theme.variantColor.value, <int, Color>{
50: theme.variantColor.withOpacity(0.1),
100: theme.variantColor.withOpacity(0.2),
200: theme.variantColor.withOpacity(0.3),
300: theme.variantColor.withOpacity(0.4),
400: theme.variantColor.withOpacity(0.5),
500: theme.variantColor.withOpacity(0.6),
600: theme.variantColor.withOpacity(0.7),
700: theme.variantColor.withOpacity(0.8),
800: theme.variantColor.withOpacity(0.9),
900: theme.variantColor,
}),
iconTheme: theme.iconTheme,
brightness: ThemeData.estimateBrightnessForColor(theme.baseColor),
textTheme: theme.textTheme,
scaffoldBackgroundColor: theme.baseColor,
);
}
@OverRide
Widget build(BuildContext context) {
final materialTheme = this.materialTheme ?? _getMaterialTheme(theme);
final materialDarkTheme =
this.materialDarkTheme ?? _getMaterialTheme(darkTheme);
return NeumorphicTheme(
theme: theme,
darkTheme: darkTheme,
themeMode: themeMode,
child: Builder(
builder: (context) => IconTheme(
data: NeumorphicTheme.currentTheme(context).iconTheme,
child: MaterialApp(
title: title,
color: color,
theme: materialTheme,
darkTheme: materialDarkTheme,
initialRoute: initialRoute,
routes: routes,
themeMode: themeMode,
localizationsDelegates: localizationsDelegates,
supportedLocales: supportedLocales,
locale: locale,
home: home,
onGenerateRoute: onGenerateRoute,
onUnknownRoute: onUnknownRoute,
onGenerateTitle: onGenerateTitle,
onGenerateInitialRoutes: onGenerateInitialRoutes,
navigatorKey: navigatorKey,
navigatorObservers: navigatorObservers,
debugShowCheckedModeBanner: debugShowCheckedModeBanner,
builder: builder,
localeResolutionCallback: localeResolutionCallback,
highContrastTheme: highContrastTheme,
highContrastDarkTheme: highContrastDarkTheme,
localeListResolutionCallback: localeListResolutionCallback,
showPerformanceOverlay: showPerformanceOverlay,
checkerboardRasterCacheImages: checkerboardRasterCacheImages,
checkerboardOffscreenLayers: checkerboardOffscreenLayers,
showSemanticsDebugger: showSemanticsDebugger,
shortcuts: shortcuts,
actions: actions,
debugShowMaterialGrid: debugShowMaterialGrid),
),
),
);
}
}
'''
from flutter-neumorphic.
Related Issues (20)
- NeumorphicRadio selectedColor don't paint radio
- container
- Please merge to Flutter 3.0 HOT 1
- 404 HOT 1
- Neumorphic Circular Progress
- 大家散了吧,这个项目凉了 HOT 1
- NeumorphicToggle doesn't support transparent foreground
- Add Support for FontFamily in NeumorphicThemeData
- Button that concaves on press?
- Ability to define the border gradient (for the 'bevel' effect) HOT 1
- NeumorphicToggle should not show anything when selected index is -1 or null
- NeumorphicSlider Doesn't Slide
- NeumorphicSlider doesn't slide.
- ThemeData accentColor deprecated in Flutter 3.10.0 HOT 3
- getter textTheme isn't defined for type AppBarTheme HOT 5
- AppBarTheme HOT 7
- Error After Updating Xcode and Flutter HOT 2
- flutter 3.13.2 impeller HOT 7
- The properties maxLines & overflow aren't available in NeumorphicText, or do I miss something?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-neumorphic.