ma7moud3osman / easy_stepper

Flutter Package help you to build easy stepper widget with several customization
https://pub.dev/packages/easy_stepper
MIT License
91 stars 43 forks source link

Vertical Padding or margin not getting removed #35

Open parmeetmaster opened 10 months ago

parmeetmaster commented 10 months ago

Hello @ma7moud3osman,

This application there is padding or margin in vertical line its not removed.I tried every single method padding set to zero and everything but its not able to resolve.But when i set direction axis horizontal its show no padding.But in vertical its shows padding pls help me to close.

I am share code as well below pls help me to close ASAP

`

import 'package:easy_stepper/easy_stepper.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:spice_impact_new/core/constants/constants.dart';

class FtrDetailsScreen extends StatefulWidget { const FtrDetailsScreen({super.key});

@override State createState() => _FtrDetailsScreenState(); }

class _FtrDetailsScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( leadingWidth: 30, title: Row( children: [ Image.asset( ImageLocations.roundedPerson, height: 30, width: 30, ), SizedBox( width: 12, ), Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: [ Text( "Sanjeev Screen", style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, ), ), SizedBox( height: 2, ), Text( "Adhikaris ID: 11485", style: TextStyle(fontSize: 10), ) ], ), ], ), ), body: ListView( padding: EdgeInsets.only(top: 10, left: 10, right: 10), children: [ Text( "Basic Details", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14), ), SizedBox( height: 10, ), GridView( shrinkWrap: true, padding: EdgeInsets.all(0), gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 3, childAspectRatio: 2.8), children: [ _getTitleSubtle(), _getTitleSubtle(), _getTitleSubtle(), ], ), const Divider(), Padding( padding: const EdgeInsets.only(top: 8.0), child: Text( "09/03/2023 | 09:45 PM", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14), ), ), Text( "Date FTR Request Raised ( by SMA)", style: TextStyle(color: AppColors.GREY_SUBTITLE, fontSize: 12), ), SizedBox( height: 10, ), Padding( padding: const EdgeInsets.only(top: 18.0), child: Text( "Request Status", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14), ), ), Padding( padding: const EdgeInsets.only(top: 8.0), child: Text( "Approved", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 12, color: AppColors.GREEN_TASK), ), ), Column( mainAxisSize: MainAxisSize.min, children: [ EasyStepper( disableScroll: true, padding: EdgeInsets.all(0), lineStyle: LineStyle( lineType: LineType.normal, lineSpace: 1, progress: 0.2, unreachedLineType: LineType.normal), activeStep: 2, stepRadius: 10, internalPadding: 0, showStepBorder: false, borderThickness: 5, direction: Axis.vertical, unreachedStepIconColor: Colors.white, unreachedStepBorderColor: Colors.black54, finishedStepBackgroundColor: Colors.deepPurple, unreachedStepBackgroundColor: Colors.deepOrange, showTitle: false, onStepReached: (index) => setState(() => 1), steps: [ EasyStep( topTitle: false, title: "asdasd", customStep: UnconstrainedBox(child: Container()), customTitle: Text("asdasdasd"), customLineWidget: Container(), icon: Icon(CupertinoIcons.cart), activeIcon: Icon(CupertinoIcons.cart), ), EasyStep( icon: Icon(Icons.file_present), activeIcon: Icon(Icons.file_present), ), EasyStep( icon: Icon(Icons.filter_center_focus_sharp), activeIcon: Icon(Icons.filter_center_focus_sharp), title: 'Checkout', ), EasyStep( icon: Icon(Icons.money), activeIcon: Icon(Icons.money), title: 'Payment', ), EasyStep( icon: Icon(Icons.local_shipping_outlined), activeIcon: Icon(Icons.local_shipping_outlined), title: 'Shipping', ), EasyStep( icon: Icon(Icons.file_copy_outlined), activeIcon: Icon(Icons.file_copy_outlined), title: 'Order Details', ), EasyStep( icon: Icon(Icons.check_circle_outline), activeIcon: Icon(Icons.check_circle_outline), title: 'Finish', ), ], ), ], ), ], ), ); }

Widget _getTitleSubtle() => Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "HDFC Bank", style: TextStyle(fontWeight: FontWeight.bold), ), Text( "Bank Name", style: TextStyle(color: AppColors.GREY_SUBTITLE, fontSize: 12), ) ], ); } `

image

saadzarif commented 7 months ago

@parmeetmaster It's too late but if you set the showTitle to false the spacing will go.

anmolstuteja commented 4 months ago

@saadzarif Thanks!, it's never too late.