155 lines
5.7 KiB
Dart
155 lines
5.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:permainan_kata_anak_sd/hindubuddha_curriculum.dart';
|
|
import 'package:permainan_kata_anak_sd/islam_curriculum.dart';
|
|
import 'utils/audio_manager.dart';
|
|
|
|
|
|
class StudyPage extends StatelessWidget {
|
|
final Function(String) onKingdomSelected;
|
|
|
|
const StudyPage({
|
|
required this.onKingdomSelected,
|
|
Key? key,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage('assets/images/background.jpg'),
|
|
fit: BoxFit.cover, // Menutupi seluruh layar
|
|
),
|
|
),
|
|
child: Stack(
|
|
children: [
|
|
Align(
|
|
alignment: const Alignment(0, -0.1),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
width: 250,
|
|
height: 90,
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage('assets/icons/title_belajar.png'),
|
|
fit: BoxFit.fill,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 30),
|
|
Container(
|
|
width: 300,
|
|
height: 70,
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage('assets/icons/button.png'),
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
AudioManager.playClickSound();
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => CurriculumHinduBuddhaPage(),
|
|
),
|
|
);
|
|
},
|
|
style: ButtonStyle(
|
|
minimumSize:
|
|
MaterialStateProperty.all(const Size(0, 0)),
|
|
backgroundColor:
|
|
MaterialStateProperty.all(Colors.transparent),
|
|
elevation: MaterialStateProperty.all(0),
|
|
shape:
|
|
MaterialStateProperty.all(RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.zero,
|
|
)),
|
|
overlayColor:
|
|
MaterialStateProperty.all(Colors.transparent),
|
|
),
|
|
child: const Text(
|
|
'Hindu & Buddha',
|
|
style: TextStyle(
|
|
fontFamily: 'Bestime',
|
|
color: Color.fromARGB(255, 103, 75, 47),
|
|
fontSize: 12,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 10),
|
|
Container(
|
|
width: 300,
|
|
height: 70,
|
|
decoration: BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage('assets/icons/button.png'),
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
child: ElevatedButton(
|
|
onPressed: () {
|
|
AudioManager.playClickSound();
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => CurriculumIslamPage(),
|
|
),
|
|
);
|
|
},
|
|
style: ButtonStyle(
|
|
minimumSize:
|
|
MaterialStateProperty.all(const Size(0, 0)),
|
|
backgroundColor:
|
|
MaterialStateProperty.all(Colors.transparent),
|
|
elevation: MaterialStateProperty.all(0),
|
|
shape:
|
|
MaterialStateProperty.all(RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.zero,
|
|
)),
|
|
overlayColor:
|
|
MaterialStateProperty.all(Colors.transparent),
|
|
),
|
|
child: const Text(
|
|
'Islam',
|
|
style: TextStyle(
|
|
fontFamily: 'Bestime',
|
|
color: Color.fromARGB(255, 103, 75, 47),
|
|
fontSize: 12,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
Positioned(
|
|
top: 10,
|
|
right: 10,
|
|
child: IconButton(
|
|
icon: Image.asset(
|
|
'assets/icons/exit.png',
|
|
width: 40,
|
|
height: 40,
|
|
),
|
|
onPressed: () {
|
|
AudioManager.playClickSound();
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|