This commit is contained in:
Patrick Alvin Alcala 2025-01-30 15:57:37 +08:00
parent ecc427c958
commit ee1884790a
11 changed files with 113 additions and 127 deletions

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
import 'package:pharmacy_mobile/widgets/title_widget.dart';
@ -11,34 +12,36 @@ class ListStocksPage extends StatefulWidget {
}
class _ListStocksPageState extends State<ListStocksPage> {
List<DataRow> _createRows() {
return [
DataRow(cells: [DataCell(Text('#100')), DataCell(Text('Flutter Basics')), DataCell(Text('David John'))]),
DataRow(cells: [DataCell(Text('#101')), DataCell(Text('Dart Internals')), DataCell(Text('Alex Wick'))])
];
}
List<DataColumn> _createColumns() {
return [DataColumn(label: Text('ID')), DataColumn(label: Text('Book')), DataColumn(label: Text('Author'))];
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
alignment: Alignment.center,
height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration(
gradient: LinearGradient(
colors: [
Color.fromRGBO(34, 51, 69, 1),
Color.fromRGBO(22, 32, 44, 1),
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
body: PageBackgroundWidget(
child: Column(children: [
const Gap(120),
const TitleWidget(firstTextSize: 16, secondTextSize: 32),
const Gap(32),
const TextWidget(text: 'List of Stocks'),
const Gap(16),
DataTable(
decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 1.0),
borderRadius: BorderRadius.circular(8.0),
color: Color.fromARGB(255, 240, 240, 240),
),
child: Center(
child: Column(
children: [
const Gap(120),
const TitleWidget(firstTextSize: 16, secondTextSize: 32),
const Gap(32),
const TextWidget(text: 'List of Stocks'),
const Gap(16),
],
),
),
),
);
columns: _createColumns(),
rows: _createRows(),
)
])));
}
}