local_hero_transform 1.0.0 copy "local_hero_transform: ^1.0.0" to clipboard
local_hero_transform: ^1.0.0 copied to clipboard

local hero transform is a Flutter package that simplifies seamless transitions between items in grid and list views using local hero animations, enhancing your app's visual appeal

LocalHeroTransform License: MIT #

local hero transform is A Flutter package for creating seamless hero transitions between grid and list views with enhanced customization and performance for optimize user experience .

Screen Shoots #

Image 1 Image 2 Image 3
** source code here** ** ** source code here**

Platform Support #

Android iOS MacOS Web Linux Windows
✔️ ✔️ ✔️ ✔️ ✔️ ✔️

✨Features #

  • Seamless Transitions: Beautiful hero animations between grid and list views
  • Highly Customizable: Full control over card content and styling
  • Responsive Design: Works on all screen sizes and devices
  • Performance Optimized: Smooth animations even with many items
  • Flexible API: Adapts to various use cases and designs

Installation #

Add local_hero_transform to your pubspec.yaml file:

dependencies:
local_hero_transform: ^1.0.0

Usage #

Example Here's a basic example of how to implement Local Hero Transform in your Flutter application:

import 'package:flutter/material.dart';
import 'package:local_hero_transform/local_hero_transform.dart';

class MyHomePage extends StatelessWidget {
final TabController tabController;
final  List<DateModel> itemsMode;// Your model

MyHomePage({required this.tabController,required this.itemsMode});

@override
Widget build(BuildContext context) {
return  LocalHeroViews(
      tabController: tabController,
      textDirection: TextDirection.ltr,
      itemCount: itemsMode.length,
      itemsModel:(index) => ItemsModel(
      name: Text(itemsMode[index].name),
      title: Text(itemsMode[index].title),
      subTitle: Text(itemsMode[index].subTitle),
      favoriteIconButton: IconButton(onPressed: () {}, icon: Icon(Icons.add)),
      subTitleIcon: const Icon(Icons.location_on_outlined, color: Color(0xFF95979A), size: 10),
      image:  DecorationImage(image: NetworkImage(itemsMode[index].imageUri)),
     ),
   );
  }
 }

⚠️ Important Notes #

This package does not support full responsiveness on web and desktop platforms due to the wide variety of use cases. As such, the package cannot manage all scenarios effectively. However, it does provide the flexibility to customize any widget with the animations of your choice.

Customization #

You can customize the transition duration and design size as follows:

LocalHeroViews(
tabController: _controller,
transitionDuration: Duration(milliseconds: 500),
designSize: Size(360, 640),
 itemCount: itemsMode.length,
itemsModel:(index) => ItemsModel(
name: Text(itemsMode[index].name),
title: Text(itemsMode[index].title),
ubTitle: Text(itemsMode[index].subTitle),
favoriteIconButton: IconButton(onPressed: () {}, icon: Icon(Icons.add)),
subTitleIcon: const Icon(Icons.location_on_outlined, color: Color(0xFF95979A), size: 10),
image: DecorationImage(image: NetworkImage(itemsMode[index].imageUri)),
),
)

Frequently Asked Questions❓ #

Q: How do I handle different layouts for different screen sizes? A: Use the ScreenUtilInit Package to define responsive layouts:

   ScreenUtilInit(
   designSize:
   widget.designSize ?? const Size(428, 926), // Set design size for responsive layout.
   minTextAdapt: true, // Allow text to adapt to screen size.
   enableScaleText: () => false, // Disable text scaling.
   splitScreenMode: true, // Enable split screen mode for responsive design.
   builder: (context, child) {
      return MaterialApp();
  });


  Container(height:100.h,width:200.w,),
  Text("example".sp),
  BorderRadius.circular(24.0.r),


🎨 Advanced Customization #

see example here

🤝 Contributing #

We welcome contributions! Please follow these steps:

Fork the repository

Create your feature branch (git checkout -b feature/AmazingFeature)

Commit your changes (git commit -m 'Add some AmazingFeature')

Push to the branch (git push origin feature/AmazingFeature)

Open a Pull Request

📄 License #

MIT License

Copyright (c) 2023 Najeeb Aslan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or pull request.

188
likes
0
points
114
downloads

Publisher

unverified uploader

Weekly Downloads

local hero transform is a Flutter package that simplifies seamless transitions between items in grid and list views using local hero animations, enhancing your app's visual appeal

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_screenutil

More

Packages that depend on local_hero_transform