24 lines
525 B
Dart
24 lines
525 B
Dart
/// Opens the profile screen from an app bar.
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../profile_screen.dart';
|
|
|
|
class ProfileButton extends StatelessWidget {
|
|
const ProfileButton({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return IconButton(
|
|
tooltip: 'Profile',
|
|
onPressed: () {
|
|
Navigator.of(
|
|
context,
|
|
).push<void>(MaterialPageRoute(builder: (_) => const ProfileScreen()));
|
|
},
|
|
icon: const Icon(Icons.person_outline),
|
|
);
|
|
}
|
|
}
|