jusbid_shared

Reusable Flutter UI components, theming, networking utilities, and widgets shared across all JusBid applications.

Features

  • 🎨 AppColors & AppTheme — Material 3 theme with Plus Jakarta Sans, brand gradients, and a full color palette
  • Failure classes — Typed network/auth/cache error handling with equatable
  • 🌐 ApiClient — Dio HTTP client with automatic Bearer token injection
  • 🧰 Formatters — Indian currency (₹), date ranges, and countdown timer formatting
  • 🔘 CustomButton — Elevated / outlined button with built-in loading spinner
  • 📝 CustomTextField — Styled input with validation support
  • 🗂 SectionHeader — Section title with optional "See All" action
  • 📭 EmptyStateWidget — Full-page empty state with icon, title, and CTA button
  • 🔐 JusBidLoginPage — Ready-to-use email + password login form widget

Installation

Add to your pubspec.yaml:

dependencies:
  jusbid_shared: ^0.0.2

Usage

import 'package:jusbid_shared/jusbid_shared.dart';

// Apply the shared theme
MaterialApp(
  theme: AppTheme.lightTheme,
  home: ...,
)

// Use a shared widget
CustomButton(
  text: 'Place Bid',
  onPressed: () {},
)

// Handle failures
ServerFailure failure = ServerFailure('Something went wrong', 500);

Available Exports

Symbol Category
AppColors, AppConstants Constants
AppTheme Theming
Failure, ServerFailure, NetworkFailure, CacheFailure, AuthFailure, ValidationFailure Networking
ApiClient Networking
Formatters Utilities
CustomButton, CustomTextField, EmptyStateWidget, SectionHeader Widgets
JusBidLoginPage Auth UI