alexeyinkin commented on code in PR #24338:
URL: https://github.com/apache/beam/pull/24338#discussion_r1043307866
##########
playground/frontend/playground_components/lib/src/widgets/toasts/toast.dart:
##########
@@ -19,44 +19,52 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
-import '../constants/sizes.dart';
+import '../../assets/assets.gen.dart';
+import '../../constants/colors.dart';
+import '../../constants/sizes.dart';
+import '../../models/toast.dart';
+import '../../models/toast_type.dart';
+import '../../playground_components.dart';
-const kNotificationBorderWidth = 4.0;
-const kMaxTextWidth = 300.0;
+const _borderWidth = 4.0;
+const _textWidth = 300.0;
-class BaseNotification extends StatelessWidget {
- final String title;
- final String notification;
- final Color color;
- final String asset;
+const _colors = UnmodifiableToastTypeMap(
+ error: BeamNotificationColors.error,
+ info: BeamNotificationColors.info,
+);
- const BaseNotification({
- super.key,
- required this.title,
- required this.notification,
- required this.color,
- required this.asset,
- });
+final _iconNames = UnmodifiableToastTypeMap(
+ error: Assets.notificationIcons.error,
+ info: Assets.notificationIcons.info,
+);
+
+class ToastWidget extends StatelessWidget {
+ final Toast toast;
+
+ const ToastWidget(this.toast);
@override
Widget build(BuildContext context) {
- return Stack(
- children: [
- _renderLeftBorder(context),
- _renderNotificationContent(context),
- ],
+ return Card(
+ child: Stack(
+ children: [
+ _leftBorder(context),
Review Comment:
This is a moved code, let's keep it as it is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]