generic_package 0.0.1 copy "generic_package: ^0.0.1" to clipboard
generic_package: ^0.0.1 copied to clipboard

A generic package which shows three types of list : Recipe list, books list and Request list with different UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:generic_package/recipelist.dart';

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static List<dynamic> data = [];
  static List<dynamic> booksData = [];
  static List<dynamic> aidRequestData = [];

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    String category = 'R';
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: HomeScreen(
        list: category == 'A'
            ? aidRequestData
            : category == 'B'
                ? booksData
                : data,
        category: category,
      ),
    );
  }
}
0
likes
120
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A generic package which shows three types of list : Recipe list, books list and Request list with different UI.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

carousel_slider, flutter

More

Packages that depend on generic_package