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.
		
		
		
		
		
			
		
			
	
	
		
			57 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
		
		
			
		
	
	
			57 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Dart
		
	
| 
											2 months ago
										 | import 'package:flutter/material.dart'; | ||
|  | import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||
|  | import 'package:hmg_patient_app_new/core/utils/utils.dart'; | ||
|  | import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | ||
|  | import 'package:hmg_patient_app_new/theme/colors.dart'; | ||
|  | 
 | ||
|  | class WelcomeWidget extends StatelessWidget { | ||
|  |   final String name; | ||
|  |   final String imageUrl; | ||
|  |   final VoidCallback? onTap; | ||
|  | 
 | ||
|  |   const WelcomeWidget({ | ||
|  |     super.key, | ||
|  |     required this.name, | ||
|  |     required this.imageUrl, | ||
|  |     this.onTap, | ||
|  |   }); | ||
|  | 
 | ||
|  |   @override | ||
|  |   Widget build(BuildContext context) { | ||
|  |     return InkWell( | ||
|  |       onTap: onTap, | ||
|  |       borderRadius: BorderRadius.circular(30), | ||
|  |       child: Row( | ||
|  |         mainAxisSize: MainAxisSize.min, | ||
|  |         children: [ | ||
|  |           // Profile image
 | ||
|  | 
 | ||
|  |           Image.asset(imageUrl, width: 40, height: 40), | ||
|  | 
 | ||
|  |           const SizedBox(width: 10), | ||
|  | 
 | ||
|  |           // Text column
 | ||
|  |           Column( | ||
|  |             crossAxisAlignment: CrossAxisAlignment.start, | ||
|  |             children: [ | ||
|  | 
 | ||
|  |                 "Welcome".toText14(color: AppColors.greyTextColor), | ||
|  | 
 | ||
|  | 
 | ||
|  |               Row( | ||
|  |                 children: [ | ||
|  | 
 | ||
|  |                     name.toText16(isBold: true), | ||
|  | 
 | ||
|  |                   const SizedBox(width: 4), | ||
|  |                   const Icon(Icons.keyboard_arrow_down, size: 20, color: Colors.black), | ||
|  |                 ], | ||
|  |               ), | ||
|  |             ], | ||
|  |           ), | ||
|  |         ], | ||
|  |       ), | ||
|  |     ); | ||
|  |   } | ||
|  | } |