Fakultas Ilmu Komputer UI

Commit cc25fe8e authored by Agnes Handoko's avatar Agnes Handoko
Browse files

[CHORE] connect each separate page with navigator

parent 6418b35c
Pipeline #41163 failed with stages
in 1 minute and 4 seconds
......@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:ppl_disabilitas/component/bisago_drawer.dart';
import 'package:flutter/widgets.dart';
import 'package:ppl_disabilitas/config/styles.dart';
import 'package:ppl_disabilitas/page/informasi/detailSekolah.dart';
class ListSekolah extends StatefulWidget {
@override
......@@ -20,7 +21,7 @@ class _ListSekolahState extends State<ListSekolah> {
List<String> nama_sekolah = ["Sekolah Cita Buana", "SLB Negeri Kota Depok"];
List<String> alamat_sekolah = [
"Jl. Paso No.84, Jagakarsa, Kec. Jaga",
"Jl. Paso No.84, Jagakarsa",
"Regency, Perumahan Permata"
];
......@@ -132,47 +133,53 @@ class _ListSekolahState extends State<ListSekolah> {
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
children: <Widget>[
CircleAvatar(
backgroundColor: greenPrimary,
child: Text('Test'),
),
Container(
padding: EdgeInsets.all(doubleSpace),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Flexible(
child: Text(
nama_sekolah[index],
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w800,
color: Colors.black,
fontFamily: 'Muli',
FlatButton(
onPressed: () {
_navigateToDetailSekolahPage(context);
},
child: Row(
children: <Widget>[
CircleAvatar(
backgroundColor: greenPrimary,
child: Text('Test'),
),
Container(
padding: EdgeInsets.all(doubleSpace),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Flexible(
child: Text(
nama_sekolah[index],
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w800,
color: Colors.black,
fontFamily: 'Muli',
),
),
),
),
Flexible(
child: Text(
alamat_sekolah[index],
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 15,
color: Colors.black,
fontFamily: 'Muli',
Flexible(
child: Text(
alamat_sekolah[index],
softWrap: true,
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 15,
color: Colors.black,
fontFamily: 'Muli',
),
),
),
),
],
],
),
),
),
],
],
),
),
Icon(
Icons.arrow_forward_ios,
......@@ -836,4 +843,17 @@ class _ListSekolahState extends State<ListSekolah> {
),
);
}
void _navigateToDetailSekolahPage(BuildContext context) {
final route = MaterialPageRoute(builder: (_) => DetailSekolah(
"Sekolah Pilar Indonesia",
"Jl. Paso No.84, Jagakarsa, Kec. Jagakarsa, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12620",
"02149305494",
"www.pilarindonesia.com",
"1000",
"Swasta",
"Inklusi",
"A"));
Navigator.of(context).push(route);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment