2021-04-23 11:43:24 +00:00
|
|
|
import 'package:comunic/models/user.dart';
|
|
|
|
import 'package:comunic/ui/routes/settings/account_image_settings.dart';
|
|
|
|
import 'package:comunic/ui/widgets/account_image_widget.dart';
|
|
|
|
import 'package:comunic/ui/widgets/tour/presentation_pane.dart';
|
|
|
|
import 'package:comunic/utils/intl_utils.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class AccountImageTourPane extends PresentationPane {
|
2021-04-23 11:48:33 +00:00
|
|
|
final Function(BuildContext) onUpdated;
|
|
|
|
|
|
|
|
AccountImageTourPane({
|
2022-03-10 18:39:57 +00:00
|
|
|
required User user,
|
|
|
|
required this.onUpdated,
|
2021-04-23 11:48:33 +00:00
|
|
|
}) : super(
|
2021-04-23 11:43:24 +00:00
|
|
|
iconWidget: AccountImageWidget(user: user, width: 50),
|
2022-03-10 18:39:57 +00:00
|
|
|
title: tr("Account image")!,
|
2021-04-26 08:15:19 +00:00
|
|
|
text:
|
|
|
|
"${tr("Account images allow to quickly recognize people.")}\n\n${tr("You can decide to define one now!")}",
|
2021-04-23 11:43:24 +00:00
|
|
|
actionTitle: tr("Upload an account image"),
|
|
|
|
onActionTap: (ctx) async {
|
|
|
|
await uploadNewAccountImage(ctx);
|
2021-04-23 11:48:33 +00:00
|
|
|
onUpdated(ctx);
|
2021-04-23 11:43:24 +00:00
|
|
|
});
|
|
|
|
}
|