This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Widget build(BuildContext context){ | |
| final light = ColorScheme.fromSeed(dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot, | |
| contrastLevel: 0.1, | |
| seedColor: Colors.purple, brightness: Brightness.light).toM3EThemeData(); | |
| final dark = ColorScheme.fromSeed(dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot, | |
| contrastLevel: 0.1, | |
| seedColor: Colors.purple, brightness: Brightness.dark).toM3EThemeData(); | |
| return MaterialApp( | |
| title: "Me". | |
| theme: light, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| emphasizedOverride(birghtness) { | |
| ColorScheme tempColorScheme = ColorScheme.fromSeed(seedColor: Colors.blue, brightness: brightness, dynamicSchemeVariant: DynamicSchemeVariant.tonalSpot, contrastLevel: 0.0,); | |
| final Color dark = tempColorScheme.brightness == Brightness.light ? tempColorScheme.onSurface : tempColorScheme.surface; | |
| final Color light = tempColorScheme.brightness == Brightness.light ? tempColorScheme.surface : tempColorScheme.onSurface; | |
| return M3Emphasized( | |
| displayLarge: GoogleFonts.name(textStyle: TextStyle(color: brightness == Brightness.light ? dark : light, | |
| decorationColor: brightness == Brightness.light ? dark: light,), | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2025 Fredrick Allan Grott. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| // | |
| // Modified from the Material_3_Expressive package | |
| // MIT License by Emily Moonstone 2025 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dependencies: | |
| flutter: | |
| sdk: flutter | |
| my_new_package: | |
| path: ./my_new_package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2025 Fredrick Allan Grott. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| /// Flutter widgets and utils that simplify usage of | |
| /// Material Design 3 Expressive (M3X) theming available in Flutter. | |
| /// | |
| /// To use import using a local path as I am not publishing it as | |
| /// a public package. | |
| /// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2025 Fredrick Allan Grott. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| // ignore_for_file: avoid_classes_with_only_static_members | |
| /// | |
| library; | |
| import 'package:motor/motor.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2025 Fredrick Allan Grott. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| /// | |
| // ignore_for_file: avoid_classes_with_only_static_members | |
| /// | |
| library; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:motor/motor.dart'; | |
| final controller = SequenceMotionController<ButtonState, Offset>( | |
| motion: Motion.smoothSpring(), | |
| vsync: this, | |
| converter: MotionConverter.offset, | |
| initialValue: Offset.zero, | |
| ); | |
| final sequence = MotionSequence.states({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:motor/motor.dart'; | |
| final controller = MotionController( | |
| motion: CupertinoMotion.bouncy(), // or Motion.duration(), etc. | |
| vsync: this, | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:motor/motor.dart'; | |
| final controller = PhaseMotionController<ButtonState, Offset>( | |
| motion: .smoothSpring(), | |
| vsync: this, | |
| converter: .offset, | |
| initialValue: .zero, | |
| ); | |
| // Play a sequence |