-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,528 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import 'package:example/common/base_scaffold.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:shadcn_ui/shadcn_ui.dart'; | ||
|
||
class TabsPage extends StatelessWidget { | ||
const TabsPage({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return BaseScaffold( | ||
appBarTitle: "Tabs", | ||
wrapChildrenInScrollable: false, | ||
wrapSingleChildInColumn: false, | ||
alignment: Alignment.topCenter, | ||
children: [ | ||
ShadTabs<String>( | ||
defaultValue: 'account', | ||
tabBarConstraints: const BoxConstraints(maxWidth: 400), | ||
contentConstraints: const BoxConstraints(maxWidth: 400), | ||
tabs: [ | ||
ShadTab( | ||
value: 'account', | ||
text: const Text('Account'), | ||
content: ShadCard( | ||
title: const Text('Account'), | ||
description: const Text( | ||
"Make changes to your account here. Click save when you're done."), | ||
content: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
const SizedBox(height: 16), | ||
ShadInputFormField( | ||
label: const Text('Name'), | ||
initialValue: 'Ale', | ||
), | ||
const SizedBox(height: 8), | ||
ShadInputFormField( | ||
label: const Text('Username'), | ||
initialValue: 'nank1ro', | ||
), | ||
const SizedBox(height: 16), | ||
], | ||
), | ||
footer: const ShadButton(text: Text('Save changes')), | ||
), | ||
), | ||
ShadTab( | ||
value: 'password', | ||
text: const Text('Password'), | ||
content: ShadCard( | ||
title: const Text('Password'), | ||
description: const Text( | ||
"Change your password here. After saving, you'll be logged out."), | ||
content: Column( | ||
children: [ | ||
const SizedBox(height: 16), | ||
ShadInputFormField( | ||
label: const Text('Current password'), | ||
obscureText: true, | ||
), | ||
const SizedBox(height: 8), | ||
ShadInputFormField( | ||
label: const Text('New password'), | ||
obscureText: true, | ||
), | ||
const SizedBox(height: 16), | ||
], | ||
), | ||
footer: const ShadButton(text: Text('Save password')), | ||
), | ||
), | ||
], | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.