dev1abhi / Flutter-Animations

We are trying to make a flutter app, which has example of every flutter animation available. Currently has 11+ unique animations.
MIT License
12 stars 15 forks source link

fix: Add flutter ripple animation in a new screen #19

Closed Priyammm05 closed 1 year ago

Priyammm05 commented 1 year ago

What does this PR do?

Fixes #14

https://github.com/dev1abhi/Flutter-Animations/assets/80326453/05903d29-b0e3-40fe-bef5-e03b334aec33

Type of change:

pr-explainer-bot[bot] commented 1 year ago

Pull Request Report

Hey there! I've analyzed the changes made in the pull request and here's the report for you:

Changes

  1. Added import 'package:flutter_animations/Screens/ripple_animation.dart'; in lib/Controllers/drawercontroller.dart (line 4).
  2. Added final mainScreen5 = const RipplesAnimation(); in lib/Controllers/drawercontroller.dart (line 31).
  3. Added import 'package:flutter_animations/helpers/colors.dart'; in lib/Screens/homepage.dart (line 4).
  4. Removed import 'package:flutter_animations/helpers/colors.dart'; from lib/Screens/homepage.dart (line 8).
  5. Added import 'package:flutter_animations/helpers/colors.dart'; in lib/Screens/ripple_animation.dart (line 3).
  6. Added import '../controllers/drawercontroller.dart'; in lib/Screens/ripple_animation.dart (line 5).
  7. Added class RipplesAnimation extends StatefulWidget in lib/Screens/ripple_animation.dart (line 45).
  8. Added _RipplesAnimationState class in lib/Screens/ripple_animation.dart (line 57).
  9. Added _button() method in _RipplesAnimationState class in lib/Screens/ripple_animation.dart (line 73).
  10. Added build() method in _RipplesAnimationState class in lib/Screens/ripple_animation.dart (line 91).

Suggestions

No suggestions provided.

Bugs

No bugs found.

Improvements

No improvements suggested.

Rating

I would rate the code a 7 out of 10. The code is generally readable and performs well. However, there are a few areas that could be refactored for better readability.

Here's an example of a code snippet that could be refactored:

// Before refactoring
appBar: AppBar(
  backgroundColor: mainpagecolor,
  title: const Text('Flutter Animations'),
  leading: IconButton(
    icon: const Icon(Icons.menu),
    onPressed: controller.toggleDrawer,
    hoverColor: Colors.white,
  ),
),

// After refactoring
appBar: AppBar(
  backgroundColor: mainpagecolor,
  title: const Text('Flutter Animations'),
  leading: IconButton(
    icon: const Icon(Icons.menu),
    onPressed: controller.toggleDrawer,
    hoverColor: Colors.white,
  ),
),

Hope this report helps! Let me know if you need any further assistance.

dev1abhi commented 1 year ago

Thanks for contributing. Please ⭐ the repo so that others could also find it.