vivla_data_grid 0.1.4 vivla_data_grid: ^0.1.4 copied to clipboard
A new VIVLA package with a data table for reservations.
import 'package:example/mock_data.dart';
import 'package:flutter/material.dart';
import 'package:vivla_data_grid/vivla_data_grid.dart';
import 'dart:convert';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
List<Map<String, dynamic>> mockData = getMockData();
String jsonInput = jsonEncode(mockData);
return MaterialApp(
title: 'VivlaDataGrid Demo',
home: Scaffold(
appBar: AppBar(
title: const Text('VivlaDataGrid Example'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: VivlaDataGrid(
inputData: jsonInput,
onRowSelected: (selectedRow) =>
print('fila selecionada $selectedRow'),
),
),
),
);
}
}