Skip to content

Commit 87d2ca3

Browse files
authored
Merge pull request #1 from larmcr/stable
Update samples by using stable version of Flutter
2 parents cf517a0 + 227a128 commit 87d2ca3

File tree

9 files changed

+102
-100
lines changed

9 files changed

+102
-100
lines changed

example/lib/accessibility/neumorphic_accessibility.dart

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class __PageState extends State<_Page> {
7171
style: ElevatedButton.styleFrom(
7272
shape: RoundedRectangleBorder(
7373
borderRadius: BorderRadius.circular(12)),
74-
backgroundColor: Theme.of(context).colorScheme.secondary,
74+
// backgroundColor: Theme.of(context).colorScheme.secondary,
7575
),
7676
child: Text(
7777
"back",
@@ -127,11 +127,12 @@ class __PageState extends State<_Page> {
127127
padding: const EdgeInsets.all(8.0),
128128
child: ElevatedButton(
129129
style: ElevatedButton.styleFrom(
130-
shape: RoundedRectangleBorder(
131-
borderRadius: BorderRadius.circular(12)),
132-
backgroundColor: selectedConfiguratorIndex == 0
133-
? buttonActiveColor
134-
: buttonInnactiveColor),
130+
shape: RoundedRectangleBorder(
131+
borderRadius: BorderRadius.circular(12)),
132+
// backgroundColor: selectedConfiguratorIndex == 0
133+
// ? buttonActiveColor
134+
// : buttonInnactiveColor
135+
),
135136
child: Text(
136137
"Style",
137138
style: TextStyle(
@@ -154,11 +155,12 @@ class __PageState extends State<_Page> {
154155
padding: const EdgeInsets.all(8.0),
155156
child: ElevatedButton(
156157
style: ElevatedButton.styleFrom(
157-
shape: RoundedRectangleBorder(
158-
borderRadius: BorderRadius.circular(12)),
159-
backgroundColor: selectedConfiguratorIndex == 1
160-
? buttonActiveColor
161-
: buttonInnactiveColor),
158+
shape: RoundedRectangleBorder(
159+
borderRadius: BorderRadius.circular(12)),
160+
// backgroundColor: selectedConfiguratorIndex == 1
161+
// ? buttonActiveColor
162+
// : buttonInnactiveColor
163+
),
162164
child: Text(
163165
"Element",
164166
style: TextStyle(
@@ -183,9 +185,9 @@ class __PageState extends State<_Page> {
183185
style: ElevatedButton.styleFrom(
184186
shape: RoundedRectangleBorder(
185187
borderRadius: BorderRadius.circular(12)),
186-
backgroundColor: selectedConfiguratorIndex == 2
187-
? buttonActiveColor
188-
: buttonInnactiveColor,
188+
// backgroundColor: selectedConfiguratorIndex == 2
189+
// ? buttonActiveColor
190+
// : buttonInnactiveColor,
189191
),
190192
child: Text(
191193
"Border",
@@ -528,9 +530,9 @@ class __PageState extends State<_Page> {
528530
style: ElevatedButton.styleFrom(
529531
shape: RoundedRectangleBorder(
530532
borderRadius: BorderRadius.circular(12)),
531-
backgroundColor: shape == NeumorphicShape.concave
532-
? buttonActiveColor
533-
: buttonInnactiveColor,
533+
// backgroundColor: shape == NeumorphicShape.concave
534+
// ? buttonActiveColor
535+
// : buttonInnactiveColor,
534536
),
535537
onPressed: () {
536538
setState(() {
@@ -551,9 +553,9 @@ class __PageState extends State<_Page> {
551553
style: ElevatedButton.styleFrom(
552554
shape: RoundedRectangleBorder(
553555
borderRadius: BorderRadius.circular(12)),
554-
backgroundColor: shape == NeumorphicShape.convex
555-
? buttonActiveColor
556-
: buttonInnactiveColor,
556+
// backgroundColor: shape == NeumorphicShape.convex
557+
// ? buttonActiveColor
558+
// : buttonInnactiveColor,
557559
),
558560
onPressed: () {
559561
setState(() {
@@ -574,9 +576,9 @@ class __PageState extends State<_Page> {
574576
style: ElevatedButton.styleFrom(
575577
shape: RoundedRectangleBorder(
576578
borderRadius: BorderRadius.circular(12)),
577-
backgroundColor: shape == NeumorphicShape.flat
578-
? buttonActiveColor
579-
: buttonInnactiveColor,
579+
// backgroundColor: shape == NeumorphicShape.flat
580+
// ? buttonActiveColor
581+
// : buttonInnactiveColor,
580582
),
581583
onPressed: () {
582584
setState(() {

example/lib/playground/neumorphic_playground.dart

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class __PageState extends State<_Page> {
7272
padding: const EdgeInsets.only(left: 8.0, right: 8.0, top: 8.0),
7373
child: ElevatedButton(
7474
style: ElevatedButton.styleFrom(
75-
backgroundColor: Theme.of(context).colorScheme.secondary,
75+
// backgroundColor: Theme.of(context).colorScheme.secondary,
7676
shape: RoundedRectangleBorder(
7777
borderRadius: BorderRadius.circular(12))),
7878
child: const Text(
@@ -127,9 +127,9 @@ class __PageState extends State<_Page> {
127127
padding: const EdgeInsets.all(8.0),
128128
child: ElevatedButton(
129129
style: ElevatedButton.styleFrom(
130-
backgroundColor: selectedConfiguratorIndex == 0
131-
? buttonActiveColor
132-
: buttonInnactiveColor,
130+
// backgroundColor: selectedConfiguratorIndex == 0
131+
// ? buttonActiveColor
132+
// : buttonInnactiveColor,
133133
shape: RoundedRectangleBorder(
134134
borderRadius: BorderRadius.circular(12))),
135135
child: Text(
@@ -154,9 +154,9 @@ class __PageState extends State<_Page> {
154154
padding: const EdgeInsets.all(8.0),
155155
child: ElevatedButton(
156156
style: ElevatedButton.styleFrom(
157-
backgroundColor: selectedConfiguratorIndex == 1
158-
? buttonActiveColor
159-
: buttonInnactiveColor,
157+
// backgroundColor: selectedConfiguratorIndex == 1
158+
// ? buttonActiveColor
159+
// : buttonInnactiveColor,
160160
shape: RoundedRectangleBorder(
161161
borderRadius: BorderRadius.circular(12))),
162162
child: Text(
@@ -181,9 +181,9 @@ class __PageState extends State<_Page> {
181181
padding: const EdgeInsets.all(8.0),
182182
child: ElevatedButton(
183183
style: ElevatedButton.styleFrom(
184-
backgroundColor: selectedConfiguratorIndex == 2
185-
? buttonActiveColor
186-
: buttonInnactiveColor,
184+
// backgroundColor: selectedConfiguratorIndex == 2
185+
// ? buttonActiveColor
186+
// : buttonInnactiveColor,
187187
shape: RoundedRectangleBorder(
188188
borderRadius: BorderRadius.circular(12))),
189189
child: Text(
@@ -636,9 +636,9 @@ class __PageState extends State<_Page> {
636636
padding: const EdgeInsets.all(8.0),
637637
child: ElevatedButton(
638638
style: ElevatedButton.styleFrom(
639-
backgroundColor: boxShape.isRoundRect
640-
? buttonActiveColor
641-
: buttonInnactiveColor,
639+
// backgroundColor: boxShape.isRoundRect
640+
// ? buttonActiveColor
641+
// : buttonInnactiveColor,
642642
shape: RoundedRectangleBorder(
643643
borderRadius: BorderRadius.circular(12))),
644644
onPressed: () {
@@ -662,9 +662,9 @@ class __PageState extends State<_Page> {
662662
padding: const EdgeInsets.all(8.0),
663663
child: ElevatedButton(
664664
style: ElevatedButton.styleFrom(
665-
backgroundColor: boxShape.isBeveled
666-
? buttonActiveColor
667-
: buttonInnactiveColor,
665+
// backgroundColor: boxShape.isBeveled
666+
// ? buttonActiveColor
667+
// : buttonInnactiveColor,
668668
shape: RoundedRectangleBorder(
669669
borderRadius: BorderRadius.circular(12))),
670670
onPressed: () {
@@ -688,9 +688,9 @@ class __PageState extends State<_Page> {
688688
padding: const EdgeInsets.all(8.0),
689689
child: ElevatedButton(
690690
style: ElevatedButton.styleFrom(
691-
backgroundColor: boxShape.isCircle
692-
? buttonActiveColor
693-
: buttonInnactiveColor,
691+
// backgroundColor: boxShape.isCircle
692+
// ? buttonActiveColor
693+
// : buttonInnactiveColor,
694694
shape: RoundedRectangleBorder(
695695
borderRadius: BorderRadius.circular(12))),
696696
onPressed: () {
@@ -713,9 +713,9 @@ class __PageState extends State<_Page> {
713713
padding: const EdgeInsets.all(8.0),
714714
child: ElevatedButton(
715715
style: ElevatedButton.styleFrom(
716-
backgroundColor: boxShape.isStadium
717-
? buttonActiveColor
718-
: buttonInnactiveColor,
716+
// backgroundColor: boxShape.isStadium
717+
// ? buttonActiveColor
718+
// : buttonInnactiveColor,
719719
shape: RoundedRectangleBorder(
720720
borderRadius: BorderRadius.circular(12))),
721721
onPressed: () {
@@ -738,9 +738,9 @@ class __PageState extends State<_Page> {
738738
padding: const EdgeInsets.all(8.0),
739739
child: ElevatedButton(
740740
style: ElevatedButton.styleFrom(
741-
backgroundColor: boxShape.isCustomPath
742-
? buttonActiveColor
743-
: buttonInnactiveColor,
741+
// backgroundColor: boxShape.isCustomPath
742+
// ? buttonActiveColor
743+
// : buttonInnactiveColor,
744744
shape: RoundedRectangleBorder(
745745
borderRadius: BorderRadius.circular(12))),
746746
onPressed: () {
@@ -778,9 +778,9 @@ class __PageState extends State<_Page> {
778778
padding: const EdgeInsets.all(8.0),
779779
child: ElevatedButton(
780780
style: ElevatedButton.styleFrom(
781-
backgroundColor: shape == NeumorphicShape.concave
782-
? buttonActiveColor
783-
: buttonInnactiveColor,
781+
// backgroundColor: shape == NeumorphicShape.concave
782+
// ? buttonActiveColor
783+
// : buttonInnactiveColor,
784784
shape: RoundedRectangleBorder(
785785
borderRadius: BorderRadius.circular(12))),
786786
onPressed: () {
@@ -800,9 +800,9 @@ class __PageState extends State<_Page> {
800800
padding: const EdgeInsets.all(8.0),
801801
child: ElevatedButton(
802802
style: ElevatedButton.styleFrom(
803-
backgroundColor: shape == NeumorphicShape.convex
804-
? buttonActiveColor
805-
: buttonInnactiveColor,
803+
// backgroundColor: shape == NeumorphicShape.convex
804+
// ? buttonActiveColor
805+
// : buttonInnactiveColor,
806806
shape: RoundedRectangleBorder(
807807
borderRadius: BorderRadius.circular(12))),
808808
onPressed: () {
@@ -822,9 +822,9 @@ class __PageState extends State<_Page> {
822822
padding: const EdgeInsets.all(8.0),
823823
child: ElevatedButton(
824824
style: ElevatedButton.styleFrom(
825-
backgroundColor: shape == NeumorphicShape.flat
826-
? buttonActiveColor
827-
: buttonInnactiveColor,
825+
// backgroundColor: shape == NeumorphicShape.flat
826+
// ? buttonActiveColor
827+
// : buttonInnactiveColor,
828828
shape: RoundedRectangleBorder(
829829
borderRadius: BorderRadius.circular(12))),
830830
onPressed: () {

example/lib/playground/text_playground.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class __PageState extends State<_Page> {
9292
style: ElevatedButton.styleFrom(
9393
shape: RoundedRectangleBorder(
9494
borderRadius: BorderRadius.circular(12)),
95-
backgroundColor: Theme.of(context).colorScheme.secondary,
95+
// backgroundColor: Theme.of(context).colorScheme.secondary,
9696
),
9797
child: Text(
9898
"back",
@@ -150,9 +150,9 @@ class __PageState extends State<_Page> {
150150
style: ElevatedButton.styleFrom(
151151
shape: RoundedRectangleBorder(
152152
borderRadius: BorderRadius.circular(12)),
153-
backgroundColor: selectedConfiguratorIndex == 0
154-
? buttonActiveColor
155-
: buttonInnactiveColor,
153+
// backgroundColor: selectedConfiguratorIndex == 0
154+
// ? buttonActiveColor
155+
// : buttonInnactiveColor,
156156
),
157157
child: Text(
158158
"Style",
@@ -178,9 +178,9 @@ class __PageState extends State<_Page> {
178178
style: ElevatedButton.styleFrom(
179179
shape: RoundedRectangleBorder(
180180
borderRadius: BorderRadius.circular(12)),
181-
backgroundColor: selectedConfiguratorIndex == 1
182-
? buttonActiveColor
183-
: buttonInnactiveColor,
181+
// backgroundColor: selectedConfiguratorIndex == 1
182+
// ? buttonActiveColor
183+
// : buttonInnactiveColor,
184184
),
185185
child: Text(
186186
"Element",
@@ -257,9 +257,9 @@ class __PageState extends State<_Page> {
257257
style: ElevatedButton.styleFrom(
258258
shape: RoundedRectangleBorder(
259259
borderRadius: BorderRadius.circular(12)),
260-
backgroundColor: shape == NeumorphicShape.concave
261-
? buttonActiveColor
262-
: buttonInnactiveColor,
260+
// backgroundColor: shape == NeumorphicShape.concave
261+
// ? buttonActiveColor
262+
// : buttonInnactiveColor,
263263
),
264264
onPressed: () {
265265
setState(() {
@@ -280,9 +280,9 @@ class __PageState extends State<_Page> {
280280
style: ElevatedButton.styleFrom(
281281
shape: RoundedRectangleBorder(
282282
borderRadius: BorderRadius.circular(12)),
283-
backgroundColor: shape == NeumorphicShape.convex
284-
? buttonActiveColor
285-
: buttonInnactiveColor,
283+
// backgroundColor: shape == NeumorphicShape.convex
284+
// ? buttonActiveColor
285+
// : buttonInnactiveColor,
286286
),
287287
onPressed: () {
288288
setState(() {
@@ -303,9 +303,9 @@ class __PageState extends State<_Page> {
303303
style: ElevatedButton.styleFrom(
304304
shape: RoundedRectangleBorder(
305305
borderRadius: BorderRadius.circular(12)),
306-
backgroundColor: shape == NeumorphicShape.flat
307-
? buttonActiveColor
308-
: buttonInnactiveColor,
306+
// backgroundColor: shape == NeumorphicShape.flat
307+
// ? buttonActiveColor
308+
// : buttonInnactiveColor,
309309
),
310310
onPressed: () {
311311
setState(() {

example/lib/sample_neumorphic_playground.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ class __PageState extends State<_Page> {
250250
style: ElevatedButton.styleFrom(
251251
shape: RoundedRectangleBorder(
252252
borderRadius: BorderRadius.circular(12)),
253-
backgroundColor: shape == NeumorphicShape.concave
254-
? buttonActiveColor
255-
: buttonInnactiveColor,
253+
// backgroundColor: shape == NeumorphicShape.concave
254+
// ? buttonActiveColor
255+
// : buttonInnactiveColor,
256256
),
257257
onPressed: () {
258258
setState(() {
@@ -273,9 +273,9 @@ class __PageState extends State<_Page> {
273273
style: ElevatedButton.styleFrom(
274274
shape: RoundedRectangleBorder(
275275
borderRadius: BorderRadius.circular(12)),
276-
backgroundColor: shape == NeumorphicShape.convex
277-
? buttonActiveColor
278-
: buttonInnactiveColor,
276+
// backgroundColor: shape == NeumorphicShape.convex
277+
// ? buttonActiveColor
278+
// : buttonInnactiveColor,
279279
),
280280
onPressed: () {
281281
setState(() {
@@ -296,9 +296,9 @@ class __PageState extends State<_Page> {
296296
style: ElevatedButton.styleFrom(
297297
shape: RoundedRectangleBorder(
298298
borderRadius: BorderRadius.circular(12)),
299-
backgroundColor: shape == NeumorphicShape.flat
300-
? buttonActiveColor
301-
: buttonInnactiveColor,
299+
// backgroundColor: shape == NeumorphicShape.flat
300+
// ? buttonActiveColor
301+
// : buttonInnactiveColor,
302302
),
303303
onPressed: () {
304304
setState(() {

example/lib/samples/credit_card_sample.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class __PageContentState extends State<_PageContent> {
324324
value: 0,
325325
onChanged: (value) {
326326
setState(() {
327-
_dotIndex = value!;
327+
_dotIndex = value! as int;
328328
});
329329
},
330330
style: NeumorphicRadioStyle(
@@ -344,7 +344,7 @@ class __PageContentState extends State<_PageContent> {
344344
value: 1,
345345
onChanged: (value) {
346346
setState(() {
347-
_dotIndex = value!;
347+
_dotIndex = value! as int;
348348
});
349349
},
350350
style: NeumorphicRadioStyle(
@@ -364,7 +364,7 @@ class __PageContentState extends State<_PageContent> {
364364
value: 2,
365365
onChanged: (value) {
366366
setState(() {
367-
_dotIndex = value!;
367+
_dotIndex = value! as int;
368368
});
369369
},
370370
style: NeumorphicRadioStyle(

0 commit comments

Comments
 (0)