@override
Widget build(BuildContext context) {
if (_isLoading) {
return const Scaffold(
body: Center(child: CircularProgressIndicator()),
);
}
if (_isLoggedIn) {
return const homerscr.HomeScreen();
}
return Scaffold(
body: Stack(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/image/backgr.jpg'),
fit: BoxFit.cover,
),
),
),
Column(
children: [
const Spacer(flex: 1),
Padding(
padding: const EdgeInsets.only(left: 0),
child: Text(
"A look",
textAlign: TextAlign.center,
style: TextStyle(
color: HexColor('#A2000C'),
fontFamily: 'RoschaRegular',
fontSize: 47,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.only(left: 170),
child: Text(
'to',
textAlign: TextAlign.center,
style: TextStyle(
color: HexColor('#A2000C'),
fontFamily: 'RoschaRegular',
fontSize: 47,
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.only(left: 100),
child: Text(
'the book',
style: TextStyle(
color: HexColor('#A2000C'),
fontSize: 47,
fontWeight: FontWeight.bold,
fontFamily: 'RoschaRegular',
),
),
),
const Spacer(),
],
),
Column(
children: [
const Spacer(),
zareg(context),
const SizedBox(height: 20),
voiti(context),
],
),
],
),
);
}
Widget zareg(BuildContext context) {
return Align(
alignment: Alignment.bottomCenter,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () async {
await Navigator.push(
context,
MaterialPageRoute(builder: (context) => const LogIn()),
);
// После возврата с регистрации - проверяем статус
_checkLoginStatus();
},
child: Container(
width: MediaQuery.sizeOf(context).width * 0.936,
height: MediaQuery.sizeOf(context).width * 0.19,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/image/bgforbt.png'),
fit: BoxFit.cover,
),
),
child: const Center(
child: Text(
'Зарегистрироваться',
style: TextStyle(
color: Color(0xFFA2000C),
fontFamily: 'RoschaRegular',
fontSize: 27,
fontWeight: FontWeight.bold,
),
),
),
),
),
);
}
Widget voiti(BuildContext context) {
return Align(
alignment: Alignment.bottomCenter,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SignUp()),
);
},
child: Container(
width: MediaQuery.sizeOf(context).width * 0.936,
height: MediaQuery.sizeOf(context).width * 0.19,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/image/bgforbt.png'),
fit: BoxFit.cover,
),
),
child: const Center(
child: Text(
'Войти',
style: TextStyle(
color: Color(0xFFA2000C),
fontFamily: 'RoschaRegular',
fontSize: 30,
fontWeight: FontWeight.bold,
),
),
),
),
),
);
}
}
и выходит ошибка column isn't a function