Skip to content

Commit

Permalink
docs: add TODOs REST API endpoint info to pres
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryConrad committed Nov 26, 2023
1 parent b333b71 commit 8b62e9a
Showing 1 changed file with 58 additions and 3 deletions.
61 changes: 58 additions & 3 deletions examples/presentation/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,68 @@ FlutterDeckSlide rustLibrary(BuildContext context) {
);
},
rightBuilder: (context) {
const tableHeaderStyle = TextStyle(fontWeight: FontWeight.w700);
const tableData = [
[
Text('HTTP Verb', style: tableHeaderStyle),
Text('Endpoint', style: tableHeaderStyle),
Text('Description', style: tableHeaderStyle),
],
[
Text('GET'),
Text('/todos'),
Text('Returns a list of todos'),
],
[
Text('POST'),
Text('/todos'),
Text('Creates a new todo'),
],
[
Text('GET'),
Text('/todos/:id'),
Text('Returns todo with the given id'),
],
[
Text('DELETE'),
Text('/todos/:id'),
Text('Deletes todo with the given id'),
],
];

return Column(
children: [
// TODO(GregoryConrad): add the REST API table here from thesis
DefaultTextStyle(
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: FlutterDeckTheme.of(context).splitSlideTheme.rightColor,
),
child: Table(
defaultColumnWidth: const IntrinsicColumnWidth(),
border: TableBorder.all(),
children: [
for (final row in tableData)
TableRow(
children: [
for (final cell in row)
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8,
vertical: 4,
),
child: cell,
),
],
),
],
),
),
const SizedBox(height: 32),
Image.asset('assets/todos-server.png'),
const SizedBox(height: 8),
const SizedBox(height: 16),
Text(
'TODOs web server capsule dependency graph',
'TODOs web server endpoints and capsule dependency graph',
style: TextStyle(
fontSize: 16,
fontStyle: FontStyle.italic,
Expand Down

0 comments on commit 8b62e9a

Please sign in to comment.