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

A Flutter package that allows customization of the datatable by modifying the colors

example/lib/main.dart

import 'package:example/widgets/custom_datatable.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
  TextStyle headerTextStyle =TextStyle(color:Colors.white,fontSize:20);
    return MaterialApp(
      title: 'Custom Datatable example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: 
          Center(
            child: 
              CustomDataTable(
                headerColor: Colors.green,
                rowColor1:Colors.grey.shade300,
                dataTable: DataTable(
                    columns: [DataColumn(label: Text("Name",style: headerTextStyle,),),DataColumn(label: Text("Email",style: headerTextStyle,),),DataColumn(label: Text("Adress",style: headerTextStyle,),),], 
                    rows: [
                    DataRow(cells: [DataCell(Text("Brandon")),DataCell(Text("brandon@gmail.com")),DataCell(Text("4982  Mutton Town Road"))]),
                    DataRow(cells: [DataCell(Text("Jane")),DataCell(Text("jane@gmail.com")),DataCell(Text("1800  Fort Street")),]),
                    DataRow(cells: [DataCell(Text("John"),),DataCell(Text("john@gmail.com"),),DataCell(Text("1308  Berkley Street"),),]),
                    ]
                ),
                )
          )          
      )
    );
  }
}
1
likes
20
pub points
40%
popularity

Publisher

unverified uploader

A Flutter package that allows customization of the datatable by modifying the colors

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_datatable