table_boss 0.1.3 copy "table_boss: ^0.1.3" to clipboard
table_boss: ^0.1.3 copied to clipboard

Flutter Table_boss is new table style.

Table Style to your Flutter app.

Installation #

  1. Add the latest version of package to your pubspec.yaml (and rundart pub get):
dependencies:
  table_boss: ^0.1.3
  1. Import the package and use it in your Flutter App.
import 'package:table_boss/table_boss.dart';

Example usage #

This package using Sizer package. It's changed sizing to responsive Parameters

- .h - Returns a calculated height based on the device
- .w - Returns a calculated width based on the device
- .sp - Returns a calculated sp based on the device (deprecated)
- .dp - Returns a calculated dp based on the device

If you need more parameters ... Sizer


class Table extends StatelessWidget {
  const Table({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child:  Container(
                margin: EdgeInsets.only(left: 2.h, right: 2.h, top: 1.h),
                child: TableBoss(
                    headerHeight: 5.7.h,
                    headerStyle: TextStyle(
                        color: Colors.white,
                        fontWeight: FontWeight.bold,
                        fontSize: 10.5.sp),
                    headerColor: Colors.green[200],
                    rowDataStyle: TextStyle(fontSize: 9.5.sp),
                    rowColor: Colors.orange[50],
                    columnSpacing: 1.w,
                    columns: [
                      BossDataColumn(child: const Text('No.')),
                      BossDataColumn(child: const Text('Name')),
                      BossDataColumn(child: const Text('Type')),
                    ],
                    rows: examData
                        .map(
                          (item) => DataRow(cells: [
                            DataCell(Text(item.sId.toString())),
                            DataCell(Text(item.sName)),
                            DataCell(Text(item.sType)),
                          ]),
                        )
                        .toList()),
              )
      ),
    );
  }
}
2
likes
120
points
70
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter Table_boss is new table style.

Homepage

License

MIT (license)

Dependencies

flutter, path, sizer

More

Packages that depend on table_boss