Skip to content

Commit

Permalink
remove accentColor
Browse files Browse the repository at this point in the history
  • Loading branch information
den0206 committed May 13, 2023
1 parent 57f2b1f commit 9902598
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
7 changes: 3 additions & 4 deletions example/lib/accessibility/neumorphic_accessibility.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:example/lib/color_selector.dart';
import 'package:flutter/material.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';

class NeumorphicAccessibility extends StatefulWidget {
Expand Down Expand Up @@ -71,7 +70,7 @@ class __PageState extends State<_Page> {
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
child: Text(
"back",
style: TextStyle(color: Colors.white),
Expand Down Expand Up @@ -104,7 +103,7 @@ class __PageState extends State<_Page> {
int selectedConfiguratorIndex = 0;

Widget _configurators() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color textActiveColor = Colors.white;
Expand Down Expand Up @@ -513,7 +512,7 @@ class __PageState extends State<_Page> {
}

Widget shapeWidget() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color iconActiveColor = Colors.white;
Expand Down
8 changes: 4 additions & 4 deletions example/lib/playground/neumorphic_playground.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class __PageState extends State<_Page> {
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
child: Text(
"back",
style: TextStyle(color: Colors.white),
Expand Down Expand Up @@ -102,7 +102,7 @@ class __PageState extends State<_Page> {
int selectedConfiguratorIndex = 0;

Widget _configurators() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color textActiveColor = Colors.white;
Expand Down Expand Up @@ -622,7 +622,7 @@ class __PageState extends State<_Page> {
}

Widget boxshapeWidget() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color textActiveColor = Colors.white;
Expand Down Expand Up @@ -756,7 +756,7 @@ class __PageState extends State<_Page> {
}

Widget shapeWidget() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color iconActiveColor = Colors.white;
Expand Down
9 changes: 4 additions & 5 deletions example/lib/playground/text_playground.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:example/lib/color_selector.dart';
import 'package:flutter/material.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';

class NeumorphicTextPlayground extends StatefulWidget {
Expand Down Expand Up @@ -92,7 +91,7 @@ class __PageState extends State<_Page> {
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
child: Text(
"back",
style: TextStyle(color: Colors.white),
Expand Down Expand Up @@ -125,7 +124,7 @@ class __PageState extends State<_Page> {
int selectedConfiguratorIndex = 0;

Widget _configurators() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color textActiveColor = Colors.white;
Expand Down Expand Up @@ -238,7 +237,7 @@ class __PageState extends State<_Page> {
}

Widget shapeWidget() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color iconActiveColor = Colors.white;
Expand Down Expand Up @@ -444,7 +443,7 @@ class __PageState extends State<_Page> {
}

FontWeight _fontWeight() {
switch ((this.fontWeight / 100).toInt()) {
switch (this.fontWeight ~/ 100) {
case 1:
return FontWeight.w100;
case 2:
Expand Down
6 changes: 2 additions & 4 deletions example/lib/sample_neumorphic_playground.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:example/lib/color_selector.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';

void main() => runApp(NeumorphicPlayground());
Expand Down Expand Up @@ -85,7 +83,7 @@ class __PageState extends State<_Page> {
}

Widget _configurators() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color textActiveColor = Colors.white;
Expand Down Expand Up @@ -246,7 +244,7 @@ class __PageState extends State<_Page> {
}

Widget shapeWidget() {
final Color buttonActiveColor = Theme.of(context).accentColor;
final Color buttonActiveColor = Theme.of(context).colorScheme.secondary;
final Color buttonInnactiveColor = Colors.white;

final Color iconActiveColor = Colors.white;
Expand Down
7 changes: 2 additions & 5 deletions lib/src/widget/app_bar.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_neumorphic/flutter_neumorphic.dart';
import 'package:flutter_neumorphic/src/widget/back_button.dart';

class NeumorphicAppBar extends StatefulWidget implements PreferredSizeWidget {
static const toolbarHeight = kToolbarHeight + 16 * 2;
Expand Down Expand Up @@ -180,8 +177,8 @@ class NeumorphicAppBarState extends State<NeumorphicAppBar> {
if (title != null) {
final AppBarTheme appBarTheme = AppBarTheme.of(context);
title = DefaultTextStyle(
style: (appBarTheme.textTheme?.headline5 ??
Theme.of(context).textTheme.headline5!)
style: (appBarTheme.titleTextStyle ??
Theme.of(context).textTheme.titleMedium!)
.merge(widget.textStyle ?? nTheme?.current?.appBarTheme.textStyle),
softWrap: false,
overflow: TextOverflow.ellipsis,
Expand Down

0 comments on commit 9902598

Please sign in to comment.