enhance_widget 1.0.1 copy "enhance_widget: ^1.0.1" to clipboard
enhance_widget: ^1.0.1 copied to clipboard

Enhanced Flutter widgets: expansion panel, stepper, bottom navigation bar, box decoration, and decoration image.

enhance_widget #

pub

Enhanced Flutter widgets under a unified En* API — drop-in upgrades over Material counterparts with the extras you actually need in production apps.

Widget Enhances Highlights
EnExpansionPanelList / EnExpansionPanel / EnExpansionTile / EnExpandListView ExpansionPanel / ExpansionTile Custom / hide arrow, leading·tailing·none, custom header slots
EnStepper / EnStep Stepper Horizontal title / line positions, custom step icons
EnBottomNavigationBar BottomNavigationBar onDoubleTap, tileBuilder
EnBoxDecoration BoxDecoration innerBoxShadow
EnDecorationImage DecorationImage placeholder, destinationOffset

Screenshots #

EnExpansionPanel EnStepper EnBottomNavigationBar

EnBoxDecoration EnDecorationImage

Getting started #

dependencies:
  enhance_widget: ^1.0.1
import 'package:enhance_widget/enhance_widget.dart';

Run the example app for interactive demos of every widget:

cd packages/enhance_widget/example
flutter run

Usage #

Expansion panel / tile #

Hide or customize the expand arrow, and place it on either side:

EnExpansionPanelList(
  expansionCallback: (index, isExpanded) {
    setState(() => items[index].isExpanded = !isExpanded);
  },
  children: [
    EnExpansionPanel(
      isExpanded: items[0].isExpanded,
      canTapOnHeader: true,
      arrowColor: Colors.blue,
      arrowPosition: EnExpansionPanelArrowPosition.tailing, // leading | tailing | none
      arrow: const Icon(Icons.keyboard_arrow_right),
      arrowExpanded: const Icon(Icons.keyboard_arrow_down),
      headerBuilder: (context, isExpanded) {
        return ListTile(title: Text(items[0].title));
      },
      body: const ListTile(title: Text('Body')),
    ),
  ],
);

EnExpansionTile adds optional header / childrenHeader / childrenFooter builders for richer expand layouts. Prefer EnExpandListView when binding a typed list of expand sections.

Stepper #

Horizontal steppers can put titles under the circles and tune the connector line:

EnStepper(
  type: StepperType.horizontal,
  currentStep: index,
  horizontalTitlePosition: HorizontalTitlePosition.bottom, // inline | bottom
  horizontalLinePosition: HorizontalLinePosition.top, // center | top
  onStepTapped: (i) => setState(() => index = i),
  steps: [
    EnStep(
      icon: const Icon(Icons.looks_one),
      title: const Text('Account'),
      content: const Text('Step body'),
      isActive: index >= 0,
    ),
    EnStep(
      title: const Text('Confirm'),
      content: const Text('Step body'),
      isActive: index >= 1,
    ),
  ],
);

Bottom navigation bar #

Same API as BottomNavigationBar, plus double-tap and per-tile composition:

EnBottomNavigationBar(
  currentIndex: index,
  onTap: (i) => setState(() => index = i),
  onDoubleTap: (i) {
    // e.g. scroll to top / refresh tab
  },
  tileBuilder: (i, selected, icon, label) {
    return Column(
      mainAxisSize: MainAxisSize.min,
      children: [icon, label],
    );
  },
  items: const [
    BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
    BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
  ],
);

Box decoration (inner shadow) #

Container(
  decoration: EnBoxDecoration(
    color: Colors.white,
    borderRadius: BorderRadius.circular(12),
    innerBoxShadow: [
      BoxShadow(
        color: Colors.black.withValues(alpha: 0.12),
        blurRadius: 8,
        offset: const Offset(0, 2),
      ),
    ],
  ),
  child: const SizedBox(height: 80, width: 160),
);

Decoration image (placeholder / offset) #

Container(
  decoration: BoxDecoration(
    image: EnDecorationImage(
      image: const NetworkImage('https://example.com/photo.jpg'),
      placeholder: const AssetImage('assets/images/img_placeholder.png'),
      fit: BoxFit.cover,
      destinationOffset: const Offset(0, -12),
    ),
  ),
);

Standalone packages with the same core ideas (kept for existing dependents):

Prefer enhance_widget for new projects that need several of these widgets under one dependency.

Additional information #

0
likes
160
points
70
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Enhanced Flutter widgets: expansion panel, stepper, bottom navigation bar, box decoration, and decoration image.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, vector_math

More

Packages that depend on enhance_widget