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.
53 lines
1.7 KiB
Dart
53 lines
1.7 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/authentication_view_model.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
class ProfileWelcomeWidget extends StatelessWidget {
|
|
final Widget clinicWidget;
|
|
final double height;
|
|
final bool isClinic;
|
|
|
|
ProfileWelcomeWidget(this.clinicWidget, {this.height = 150, this.isClinic = false});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
AuthenticationViewModel authenticationViewModel = Provider.of(context);
|
|
|
|
return Container(
|
|
height: height,
|
|
// color: HexColor('#515B5D'),
|
|
width: double.infinity,
|
|
child: FractionallySizedBox(
|
|
widthFactor: 0.9,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
this.isClinic == true ? clinicWidget : SizedBox(),
|
|
SizedBox(
|
|
width: 20,
|
|
),
|
|
if (authenticationViewModel.doctorProfile != null)
|
|
CircleAvatar(
|
|
// radius: (52)
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(20),
|
|
child: CachedNetworkImage(
|
|
imageUrl: authenticationViewModel.doctorProfile.doctorImageURL,
|
|
fit: BoxFit.fill,
|
|
width: 75,
|
|
height: 75,
|
|
),
|
|
),
|
|
backgroundColor: Colors.transparent,
|
|
),
|
|
SizedBox(
|
|
height: 20,
|
|
),
|
|
],
|
|
)),
|
|
);
|
|
}
|
|
}
|