docs(authentication): update example

This commit is contained in:
2023-04-13 23:24:11 +02:00
parent 1c5a6ce9eb
commit 1de922f644
14 changed files with 302 additions and 141 deletions
@@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'package:example_router/presentation/features/sign_in/sign_in_page.dart';
import 'package:example_router/presentation/features/sign_up/sign_up_page.dart';
import 'package:example_router/presentation/features/authentication/sign_in/sign_in_page.dart';
import 'package:example_router/presentation/features/authentication/sign_up/sign_up_page.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
@@ -30,22 +30,26 @@ class WelcomePage extends StatelessWidget {
appBar: AppBar(
title: const Text('Welcome'),
),
body: SingleChildScrollView(
child: Column(
children: [
ElevatedButton(
body: ListView(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
onPressed: () => context.pushNamed(SignUpPage.pageName),
child: const Text('Sign Up')),
ElevatedButton(
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
onPressed: () => context.pushNamed(SignInPage.pageName),
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all<Color>(Colors.white),
foregroundColor:
MaterialStateProperty.all<Color>(Colors.blue)),
child: const Text('Sign In'))
],
),
child: const Text('Sign In')),
)
],
),
);
}