opt: httpError layout
This commit is contained in:
@ -4,7 +4,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
|||||||
class HttpError extends StatelessWidget {
|
class HttpError extends StatelessWidget {
|
||||||
const HttpError({
|
const HttpError({
|
||||||
required this.errMsg,
|
required this.errMsg,
|
||||||
required this.fn,
|
this.fn,
|
||||||
this.btnText,
|
this.btnText,
|
||||||
this.isShowBtn = true,
|
this.isShowBtn = true,
|
||||||
this.isInSliver = true,
|
this.isInSliver = true,
|
||||||
@ -23,7 +23,6 @@ class HttpError extends StatelessWidget {
|
|||||||
final errorContent = SizedBox(
|
final errorContent = SizedBox(
|
||||||
height: 400,
|
height: 400,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SvgPicture.asset("assets/images/error.svg", height: 200),
|
SvgPicture.asset("assets/images/error.svg", height: 200),
|
||||||
@ -50,7 +49,7 @@ class HttpError extends StatelessWidget {
|
|||||||
if (isInSliver) {
|
if (isInSliver) {
|
||||||
return SliverToBoxAdapter(child: errorContent);
|
return SliverToBoxAdapter(child: errorContent);
|
||||||
} else {
|
} else {
|
||||||
return Center(child: errorContent);
|
return Align(alignment: Alignment.topCenter, child: errorContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user