You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Dart
		
	
		
		
			
		
	
	
			35 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Dart
		
	
| 
								 
											2 years ago
										 
									 | 
							
								import 'package:fluffychat/config/app_config.dart';
							 | 
						||
| 
								 | 
							
								import 'package:flutter/gestures.dart';
							 | 
						||
| 
								 | 
							
								import 'package:flutter/material.dart';
							 | 
						||
| 
								 | 
							
								import 'package:flutter_gen/gen_l10n/l10n.dart';
							 | 
						||
| 
								 | 
							
								import 'package:go_router/go_router.dart';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								void showSubscribedSnackbar(BuildContext context) {
							 | 
						||
| 
								 | 
							
								  final Widget text = RichText(
							 | 
						||
| 
								 | 
							
								    text: TextSpan(
							 | 
						||
| 
								 | 
							
								      children: [
							 | 
						||
| 
								 | 
							
								        TextSpan(
							 | 
						||
| 
								 | 
							
								          text: L10n.of(context)!.successfullySubscribed,
							 | 
						||
| 
								 | 
							
								          style: TextStyle(
							 | 
						||
| 
								 | 
							
								            color: Theme.of(context).brightness == Brightness.light
							 | 
						||
| 
								 | 
							
								                ? Colors.white
							 | 
						||
| 
								 | 
							
								                : Colors.black,
							 | 
						||
| 
								 | 
							
								          ),
							 | 
						||
| 
								 | 
							
								        ),
							 | 
						||
| 
								 | 
							
								        const TextSpan(text: " "),
							 | 
						||
| 
								 | 
							
								        TextSpan(
							 | 
						||
| 
								 | 
							
								          text: L10n.of(context)!.clickToManageSubscription,
							 | 
						||
| 
								 | 
							
								          style: const TextStyle(color: AppConfig.primaryColor),
							 | 
						||
| 
								 | 
							
								          recognizer: TapGestureRecognizer()
							 | 
						||
| 
								 | 
							
								            ..onTap = () => context.go('/rooms/settings/subscription'),
							 | 
						||
| 
								 | 
							
								        ),
							 | 
						||
| 
								 | 
							
								      ],
							 | 
						||
| 
								 | 
							
								    ),
							 | 
						||
| 
								 | 
							
								  );
							 | 
						||
| 
								 | 
							
								  ScaffoldMessenger.of(context).showSnackBar(
							 | 
						||
| 
								 | 
							
								    SnackBar(
							 | 
						||
| 
								 | 
							
								      content: text,
							 | 
						||
| 
								 | 
							
								    ),
							 | 
						||
| 
								 | 
							
								  );
							 | 
						||
| 
								 | 
							
								}
							 |