Yuno Page Template

A comprehensive Flutter package providing UI components and data models for Yuno Learning platform. This package includes pre-built widgets for courses, batches, instructors, and various learning resources with support for both legacy and V4 API formats.

Features

  • 🎨 Modern UI Components: Material Design 3 compliant widgets
  • πŸ“± Responsive Design: Optimized for mobile, tablet, and web platforms
  • πŸ”„ API Compatibility: Support for both legacy and V4 API formats
  • 🎯 Course Management: Complete course listing, details, and batch management
  • πŸ‘¨β€πŸ« Instructor Profiles: Instructor cards and profile management
  • πŸ“š Learning Resources: Support for videos, documents, practice tests, and more
  • πŸŒ™ Theme Support: Light and dark mode compatibility
  • πŸ”§ Customizable: Highly configurable components with callback support

Getting Started

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

dependencies:
  yuno_page_template: ^1.0.49

Then run:

flutter pub get

Usage

Import the package in your Dart code:

import 'package:yuno_page_template/yuno_page_template.dart';

Basic Course Card Example

CourseCard(
  listItem: courseData,
  showPrice: true,
  navigationCallBack: () {
    // Navigate to course details
  },
  bookDemoCallBack: () {
    // Handle demo booking
  },
  availabilityCallBack: () {
    // Show availability
  },
  academyProfileCallBack: () {
    // Navigate to academy profile
  },
)

Batch Item Card Example

BatchItemCard(
  listItem: batchData,
  showPrice: true,
  enrollCallBack: () {
    // Handle enrollment
  },
)

Course Details Page Example

CourseDetailsWidget(
  shareUrl: "https://example.com/course/123",
  showPrice: true,
  isBSMLoadRunning: false,
  isBSMError: false,
  isFilterLoading: false,
  isScheduleLoadRunning: false,
  isScheduleError: false,
  isBatchLoadRunning: false,
  isBatchError: false,
  pageData: courseDetailsData,
  resourcesListResponse: resourcesData,
  scheduleResponse: scheduleData,
  courseBatchesResponse: batchesData,
  filterOptionList: filterOptions,
  navigateToResource: (index) {
    // Navigate to resource
  },
  allResourcesCallback: () {
    // Show all resources
  },
  bookDemoCallback: () {
    // Book demo
  },
  enrollCallBack: (index) {
    // Handle enrollment
  },
  availabilityCallback: () {
    // Show availability
  },
  clearBatchFilterCallback: () {
    // Clear filters
  },
  applyBatchFilterCallback: () {
    // Apply filters
  },
  resourceFilterCallback: (isSelected, index) {
    // Handle resource filtering
  },
  showDayTimeFilter: () {
    // Show day/time filter
  },
)

Components

Cards

  • CourseCard - Course listing cards with pricing and instructor info
  • BatchItemCard - Individual batch enrollment cards
  • InstructorCard - Instructor profile cards
  • ResourceCard - Learning resource cards
  • PracticeTestCard - Practice test cards
  • And many more...

Pages

  • CourseDetailsWidget - Complete course details page
  • ClassDetailsWidget - Class-specific details
  • InstructorAboutWidget - Instructor profile page
  • VideoDetailsWidget - Video content page
  • And more...

V4 Implementation

  • V4CourseCard - V4 API compatible course cards
  • V4BatchesToLegacyAdapter - Adapter for V4 to legacy format conversion
  • Complete V4 model support for all entities

API Compatibility

This package supports both legacy and V4 API formats:

  • Legacy Format: Traditional API response structures
  • V4 Format: Modern API with enhanced data models
  • Automatic Conversion: Built-in adapters for seamless integration

Dependencies

The package includes the following key dependencies:

  • flutter_html - HTML content rendering
  • youtube_player_iframe - YouTube video playback
  • cached_network_image - Image caching
  • webview_flutter - Web content display
  • pdfrx - PDF viewing
  • expandable - Expandable content
  • shimmer - Loading animations
  • And more...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions, please open an issue on the GitHub repository.

Libraries

yuno_page_template