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.
39 lines
1.0 KiB
Dart
39 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:hmg_nurses/extensions/string_extensions.dart';
|
|
|
|
class ErrorMessage extends StatelessWidget {
|
|
String? errorMessage;
|
|
|
|
ErrorMessage({this.errorMessage});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SingleChildScrollView(
|
|
child: Center(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
SizedBox(
|
|
height: 100,
|
|
),
|
|
SvgPicture.asset('assets/images/svgs/no_data.svg'),
|
|
Center(
|
|
child: Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(top: 12, bottom: 12, right: 20, left: 30),
|
|
child: Center(
|
|
child: (errorMessage ?? "").toText16(
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|