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

Naming convention #17

Closed habeebputhiyakath closed 1 year ago

habeebputhiyakath commented 1 year ago

the project file naming not correct , changed correct format Naming convention

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

Pull Request Report

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

Changes:

  1. Updated imports in fade_in_fade_out.dart (lines 1-8).
  2. Updated imports in homepage.dart (lines 1-9).
  3. Updated imports in mainscreen.dart (lines 1-8).
  4. Updated imports in menuscreen.dart (lines 1-10).
  5. Updated imports in water_drop_effect.dart (lines 1-8).
  6. Updated imports in tex_screen.dart (lines 1-6).
  7. Updated imports in main.dart (lines 1-12).
  8. Updated imports in customAppBar.dart (lines 1-7).

Suggestions:

  1. Consider using more descriptive variable and function names throughout the codebase.
  2. Avoid using relative imports (../) and use absolute imports instead.
  3. Organize imports in alphabetical order for better readability.

Bugs:

No bugs found.

Improvements:

  1. Refactor the code in fade_in_fade_out.dart to improve readability. Here's the updated code snippet:
import 'package:flutter/material.dart';
import 'package:flutter_animations/helpers/colors.dart';
import 'package:get/get.dart';
import '../controllers/drawercontroller.dart';

class FadeInFadeOut extends StatefulWidget {
  const FadeInFadeOut({Key? key}) : super(key: key);

  @override
  _FadeInFadeOutState createState() => _FadeInFadeOutState();
}

class _FadeInFadeOutState extends State<FadeInFadeOut> with SingleTickerProviderStateMixin {
  late AnimationController _animationController;
  late Animation<double> _fadeInAnimation;
  late Animation<double> _fadeOutAnimation;

  @override
  void initState() {
    super.initState();
    _animationController = AnimationController(
      vsync: this,
      duration: const Duration(seconds: 2),
    );
    _fadeInAnimation = Tween<double>(begin: 0, end: 1).animate(_animationController);
    _fadeOutAnimation = Tween<double>(begin: 1, end: 0).animate(_animationController);
    _animationController.forward();
  }

  @override
  void dispose() {
    _animationController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Fade In Fade Out'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            FadeTransition(
              opacity: _fadeInAnimation,
              child: Text(
                'Fade In',
                style: TextStyle(fontSize: 24),
              ),
            ),
            SizedBox(height: 16),
            FadeTransition(
              opacity: _fadeOutAnimation,
              child: Text(
                'Fade Out',
                style: TextStyle(fontSize: 24),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Rating:

I would rate the code a 7 out of 10. The code is generally readable and follows good practices. However, there are some areas for improvement in terms of variable naming and import organization. Additionally, the code could benefit from refactoring to improve readability in certain places.

That's it for the pull request report! Let me know if you need any further assistance.

dev1abhi commented 1 year ago

Thanks for the contribution. ✨ Accepted and merged.