26 lines
670 B
Dart
26 lines
670 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:pweb/controllers/settings/profile_actions.dart';
|
|
import 'package:pweb/pages/settings/profile/actions/button.dart';
|
|
|
|
|
|
class ProfileNameActionButton extends StatelessWidget {
|
|
const ProfileNameActionButton({super.key, required this.label});
|
|
|
|
final String label;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final controller = context.watch<ProfileActionsController>();
|
|
|
|
return ProfileActionButton(
|
|
icon: Icons.edit_outlined,
|
|
label: label,
|
|
isSelected: controller.isEditingName,
|
|
onPressed: controller.toggleNameEditing,
|
|
);
|
|
}
|
|
}
|