Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
moreInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
gigabite-pro committed Jun 24, 2021
1 parent a29962b commit bb84f47
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/screens/monument.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:bharat_mystery/screens/directions.dart';
import 'package:bharat_mystery/screens/moreInfo.dart';
import 'package:bharat_mystery/screens/quiz.dart';
import 'package:bharat_mystery/screens/streetview.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down Expand Up @@ -397,6 +398,32 @@ class _MonumentContentState extends State<MonumentContent> {
),
),
),
SizedBox(
height: 10.0,
),
MaterialButton(
splashColor: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 35.0),
height: 30.0,
elevation: 5.0,
shape: StadiumBorder(),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
MoreInfo(url: result['moreInfo']),
));
},
color: Colors.black,
child: Text(
"Get More Info",
style: TextStyle(
fontSize: 13.0,
color: Colors.white,
),
),
),
FractionallySizedBox(
widthFactor: 0.9,
child: Container(
Expand Down
40 changes: 40 additions & 0 deletions lib/screens/moreInfo.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class MoreInfo extends StatefulWidget {
final String url;
MoreInfo({this.url});

@override
_MoreInfoState createState() => _MoreInfoState();
}

class _MoreInfoState extends State<MoreInfo> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).accentColor,
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: Theme.of(context).highlightColor,
),
onPressed: () => Navigator.of(context).pop(),
),
title: Text(
"More Info",
style: TextStyle(
fontFamily: 'LexendDeca',
color: Theme.of(context).highlightColor),
),
),
body: WebView(
initialUrl: widget.url,
javascriptMode: JavascriptMode.unrestricted,
),
),
);
}
}

0 comments on commit bb84f47

Please sign in to comment.