sliding_card 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 82

Sliding Card #

Introduction #

Sliding card is a highly customizable flutter package that will help you create beautiful Cards with a sliding animation effect.

Before we start #

Before you start here are some relevant link that you might want to have a look

Quick start #

To use the application just import the package

import 'package:sliding_card/sliding_card.dart';

Then inside your code, add the SlidingCard widget.

        slimeCardElevation: 0.5,
        cardsGap: SizeConfig.safeBlockVertical,
        //The controller is necessary to animate the opening and closing of the card
        controller: widget.slidingCardController,
        slidingCardWidth: SizeConfig.horizontalBloc * 90,
        visibleCardHeight: SizeConfig.safeBlockVertical * 27,
        //the card behind the front card can't have a higher
        // hight than the front one  
        hiddenCardHeight: SizeConfig.safeBlockVertical * 15,
        //Configure your front card here
        frontCardWidget: TheFrontCard(),
        //configure your rear card here 

Conclusion #

Thank you for using my package, If you did find any bug please feel free to report it or make a pull request. If you want to contact me directly, please DM me directly on My instagram account, or you can mail me directly. For my other packages you can visit my website at

[0.0.1] - Closed Beta. #

  • TODO: Released in close beta

[0.1.0] - Initial public release day. #

  • Release on

[0.1.1] - Initial public release day fix. #

  • uploaded


import 'package:flutter/material.dart';
import 'package:sliding_card/sliding_card.dart';
import 'sizeConfig.dart';
import 'AppointmentCard.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
      home: MyHomePage(title: 'Flutter Demo Sliding Card'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
SlidingCardController controller ;
  void initState() {
    controller = SlidingCardController();
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the method, and use it to set our appbar title.
        title: Text(widget.title),
      body: Center(
        child: Column(
          children: <Widget>[
              onCardTapped: () {
                print('Card tapped controller can be used here ');
                if(controller.isCardSeparated == true)
              slidingCardController: controller,
      ), // This trailing comma makes auto-formatting nicer for build methods.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  sliding_card: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:sliding_card/sliding_card.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 3, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/sliding_card.dart.

Run flutter format to format lib/sliding_card.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.8 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies