├── .github
└── workflows
│ └── deploy_workflow.yml
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── assets
└── svg
│ └── github.svg
├── fonts
├── Outfit-Bold.ttf
├── Outfit-ExtraBold.ttf
├── Outfit-ExtraLight.ttf
├── Outfit-Light.ttf
├── Outfit-Medium.ttf
├── Outfit-Regular.ttf
├── Outfit-SemiBold.ttf
└── Outfit-Thin.ttf
├── lib
├── main.dart
├── model
│ └── curve_model.dart
├── utils
│ ├── extension
│ │ └── string.dart
│ └── theme
│ │ ├── colors.dart
│ │ ├── theme.dart
│ │ └── theme_provider.dart
└── views
│ ├── home_page.dart
│ └── widgets
│ ├── animated_box
│ ├── animated_box_widget.dart
│ ├── animated_boxes.dart
│ └── provider.dart
│ ├── appbar.dart
│ ├── code_block.dart
│ ├── cubic_curve_input_widget.dart
│ ├── cubic_graph.dart
│ ├── dropdown_menu.dart
│ ├── graph
│ ├── graph_config.dart
│ ├── graph_painter.dart
│ └── graph_widget.dart
│ ├── screen_mode.dart
│ └── time_slider.dart
├── makefile
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
├── Icon-512.png
├── Icon-maskable-192.png
└── Icon-maskable-512.png
├── index.html
└── manifest.json
/.github/workflows/deploy_workflow.yml:
--------------------------------------------------------------------------------
1 | name: Deploy to GitHub
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | - master
8 |
9 | jobs:
10 | deploy-web:
11 | name: Deploy to Github
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Clone repository
15 | uses: actions/checkout@v4
16 |
17 | - name: Setting up Flutter Environment
18 | uses: subosito/flutter-action@v2
19 | with:
20 | channel: "stable"
21 |
22 | - name: Flutter Version
23 | run: flutter --version
24 |
25 | - name: Cleaning Project
26 | run: flutter clean
27 |
28 | - name: Installing Dependencies
29 | run: flutter pub get
30 |
31 | - name: Creating a build
32 | run: flutter build web --wasm --release --base-href "/flutter-curve-visualizer/"
33 |
34 | - name: Deploying to GitHub Pages
35 | uses: peaceiris/actions-gh-pages@v4
36 | with:
37 | github_token: ${{ secrets.GITHUB_TOKEN }}
38 | publish_dir: ./build/web
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .build/
9 | .buildlog/
10 | .history
11 | .svn/
12 | .swiftpm/
13 | migrate_working_dir/
14 |
15 | # IntelliJ related
16 | *.iml
17 | *.ipr
18 | *.iws
19 | .idea/
20 |
21 | # The .vscode folder contains launch configuration and tasks you configure in
22 | # VS Code which you may wish to be included in version control, so this line
23 | # is commented out by default.
24 | #.vscode/
25 |
26 | # Flutter/Dart/Pub related
27 | **/doc/api/
28 | **/ios/Flutter/.last_build_id
29 | .dart_tool/
30 | .flutter-plugins
31 | .flutter-plugins-dependencies
32 | .pub-cache/
33 | .pub/
34 | /build/
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Android Studio will place build artifacts here
43 | /android/app/debug
44 | /android/app/profile
45 | /android/app/release
46 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: "8495dee1fd4aacbe9de707e7581203232f591b2f"
8 | channel: "stable"
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
17 | base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
18 | - platform: web
19 | create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
20 | base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Curve Visualizer
2 |
3 | A web app built with Flutter to visualize animation curves interactively. This tool helps developers
4 | understand and experiment with different Flutter animation curves in a graphical interface.
5 |
6 | ## Features
7 |
8 | - Graphical visualization of animation curves on a graph.
9 | - Interactive controls to select curve category, curve type, and animation duration.
10 | - Play/Pause animation functionality using a Floating Action Button (FAB).
11 | - Preview boxes demonstrating Translate X & Y, Scale, Rotate, Flip and Opacity effects.
12 | - Responsive design for seamless use across devices (desktop, tablet, and mobile).
13 |
14 | This app is ideal for exploring and learning how different animation curves work in Flutter
15 | applications.
16 |
17 | ## Roadmap
18 |
19 | - Add more controls.
20 |
21 | - Add Interactive Graph to visualize custom curve.
22 |
23 | - Add Switch to toggle theme mode in header.
24 |
25 | ## Live-Demo
26 |
27 | https://vchib1.github.io/flutter-curve-visualizer/
28 |
29 | ## Authors
30 |
31 | - [@vchib1](https://www.github.com/vchib1)
32 |
33 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/assets/svg/github.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/fonts/Outfit-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-Bold.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-ExtraBold.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-ExtraLight.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-Light.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-Medium.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-Regular.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-SemiBold.ttf
--------------------------------------------------------------------------------
/fonts/Outfit-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vchib1/flutter-curve-visualizer/fe547667e37b6e0c8283ece35958de785dd26455/fonts/Outfit-Thin.ttf
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_animate/flutter_animate.dart';
3 | import 'package:flutter_curve_visualizer/views/widgets/screen_mode.dart';
4 | import 'package:flutter_curve_visualizer/utils/theme/theme.dart';
5 | import 'package:provider/provider.dart';
6 | import 'package:shared_preferences/shared_preferences.dart';
7 | import 'utils/theme/theme_provider.dart';
8 | import 'views/home_page.dart';
9 | import 'views/widgets/animated_box/provider.dart';
10 |
11 | Future main() async {
12 | WidgetsFlutterBinding.ensureInitialized();
13 |
14 | final pref = await SharedPreferences.getInstance();
15 |
16 | runApp(
17 | MultiProvider(
18 | providers: [
19 | ChangeNotifierProvider(create: (context) => ThemeProvider(pref: pref)),
20 | ChangeNotifierProvider(
21 | create: (context) => AnimatedBoxesProvider(pref: pref)),
22 | ],
23 | child: const MyApp(),
24 | ),
25 | );
26 | }
27 |
28 | class MyApp extends StatelessWidget {
29 | const MyApp({super.key});
30 |
31 | ScreenMode getLayoutType(double width) {
32 | if (width < 480) {
33 | return ScreenMode.mobile;
34 | } else if (width < 850) {
35 | return ScreenMode.tablet;
36 | } else {
37 | return ScreenMode.web;
38 | }
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | final theme = MaterialTheme(Theme.of(context).textTheme);
44 |
45 | return Consumer(
46 | builder: (context, themeProvider, child) {
47 | return MaterialApp(
48 | title: 'Flutter Curve Visualizer',
49 | debugShowCheckedModeBanner: false,
50 | themeMode: themeProvider.getThemeMode(),
51 | theme: theme.lightMediumContrast(),
52 | darkTheme: theme.dark(),
53 | home: LayoutBuilder(
54 | builder: (context, constraints) {
55 | return ScreenModeWidget(
56 | mode: getLayoutType(constraints.maxWidth),
57 | child: const HomePage(),
58 | );
59 | },
60 | ),
61 | ).animate().fadeIn();
62 | },
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/model/curve_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:equatable/equatable.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class CurveModel extends Equatable {
5 | final Curve curve;
6 | final String code;
7 | final String name;
8 | final bool isCustom;
9 |
10 | const CurveModel({
11 | required this.curve,
12 | required this.code,
13 | required this.name,
14 | this.isCustom = false,
15 | });
16 |
17 | @override
18 | List