Skip to content

Commit 0d67c30

Browse files
committed
added restaurant reviews app to repo for library video
1 parent e120a75 commit 0d67c30

157 files changed

Lines changed: 4609 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

flutter_display_websites/lib/main.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ class _HomeState extends State<Home> {
5454
@override
5555
Widget build(BuildContext context) {
5656
return WebView(
57-
initialUrl: 'https://whatmyuseragent.com/',
57+
initialUrl: 'https://www.youtube.com/channel/UCy4TEe4CGipnHotkBztYvng',
5858
javascriptMode: JavascriptMode.unrestricted,
59-
onWebViewCreated: (WebViewController webViewController) async {
60-
_controller.complete(webViewController);
59+
// onWebViewCreated: (WebViewController webViewController) async {
60+
// _controller.complete(webViewController);
6161

62-
final String contentBase64 =
63-
base64Encode(const Utf8Encoder().convert(exampleHtml));
64-
await webViewController.loadUrl('data:text/html;base64,$contentBase64');
65-
},
62+
// final String contentBase64 =
63+
// base64Encode(const Utf8Encoder().convert(exampleHtml));
64+
// await webViewController.loadUrl('data:text/html;base64,$contentBase64');
65+
// },
6666
onProgress: (int progress) {
6767
print("WebView is loading (progress : $progress%)");
6868
},
@@ -74,10 +74,10 @@ class _HomeState extends State<Home> {
7474
})
7575
},
7676
navigationDelegate: (NavigationRequest request) {
77-
if (request.url.startsWith('https://www.youtube.com/')) {
78-
print('blocking navigation to $request}');
79-
return NavigationDecision.prevent;
80-
}
77+
// if (request.url.startsWith('https://www.youtube.com/')) {
78+
// print('blocking navigation to $request}');
79+
// return NavigationDecision.prevent;
80+
// }
8181
print('allowing navigation to $request');
8282
return NavigationDecision.navigate;
8383
},

flutter_display_websites/pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0"
10+
version: "2.6.1"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -99,7 +99,7 @@ packages:
9999
name: source_span
100100
url: "https://pub.dartlang.org"
101101
source: hosted
102-
version: "1.8.0"
102+
version: "1.8.1"
103103
stack_trace:
104104
dependency: transitive
105105
description:
@@ -134,7 +134,7 @@ packages:
134134
name: test_api
135135
url: "https://pub.dartlang.org"
136136
source: hosted
137-
version: "0.2.19"
137+
version: "0.3.0"
138138
typed_data:
139139
dependency: transitive
140140
description:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
12+
# IntelliJ related
13+
*.iml
14+
*.ipr
15+
*.iws
16+
.idea/
17+
18+
# The .vscode folder contains launch configuration and tasks you configure in
19+
# VS Code which you may wish to be included in version control, so this line
20+
# is commented out by default.
21+
#.vscode/
22+
23+
# Flutter/Dart/Pub related
24+
**/doc/api/
25+
**/ios/Flutter/.last_build_id
26+
.dart_tool/
27+
.flutter-plugins
28+
.flutter-plugins-dependencies
29+
.packages
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Web related
35+
lib/generated_plugin_registrant.dart
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: adc687823a831bbebe28bdccfac1a628ca621513
8+
channel: stable
9+
10+
project_type: app
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# restaurant_reviews
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13+
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
16+
samples, guidance on mobile development, and a full API reference.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply plugin: 'com.google.gms.google-services'
27+
28+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
29+
30+
android {
31+
compileSdkVersion 30
32+
33+
sourceSets {
34+
main.java.srcDirs += 'src/main/kotlin'
35+
}
36+
37+
defaultConfig {
38+
applicationId "com.programmingaddict.restaurant"
39+
minSdkVersion 16
40+
targetSdkVersion 30
41+
versionCode flutterVersionCode.toInteger()
42+
versionName flutterVersionName
43+
multiDexEnabled true
44+
}
45+
46+
buildTypes {
47+
release {
48+
// TODO: Add your own signing config for the release build.
49+
// Signing with the debug keys for now, so `flutter run --release` works.
50+
signingConfig signingConfigs.debug
51+
}
52+
}
53+
}
54+
55+
flutter {
56+
source '../..'
57+
}
58+
59+
dependencies {
60+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
61+
implementation platform('com.google.firebase:firebase-bom:27.1.0')
62+
implementation 'com.google.firebase:firebase-analytics-ktx'
63+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"project_info": {
3+
"project_number": "484044070613",
4+
"project_id": "restaurant-reviews-94e8d",
5+
"storage_bucket": "restaurant-reviews-94e8d.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:484044070613:android:ae35df567eb91d43784c5c",
11+
"android_client_info": {
12+
"package_name": "com.programmingaddict.restaurant"
13+
}
14+
},
15+
"oauth_client": [
16+
{
17+
"client_id": "484044070613-5t773p4bokd2869l8redfq9c0qs0f6ie.apps.googleusercontent.com",
18+
"client_type": 3
19+
}
20+
],
21+
"api_key": [
22+
{
23+
"current_key": "AIzaSyBY6zkDGxxcKd4oXmHy3wKcDeThPPrdgLk"
24+
}
25+
],
26+
"services": {
27+
"appinvite_service": {
28+
"other_platform_oauth_client": [
29+
{
30+
"client_id": "484044070613-5t773p4bokd2869l8redfq9c0qs0f6ie.apps.googleusercontent.com",
31+
"client_type": 3
32+
}
33+
]
34+
}
35+
}
36+
}
37+
],
38+
"configuration_version": "1"
39+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.restaurant_reviews">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.example.restaurant_reviews">
3+
<application
4+
android:label="restaurant_reviews"
5+
android:icon="@mipmap/ic_launcher">
6+
<activity
7+
android:name=".MainActivity"
8+
android:launchMode="singleTop"
9+
android:theme="@style/LaunchTheme"
10+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
11+
android:hardwareAccelerated="true"
12+
android:windowSoftInputMode="adjustResize">
13+
<!-- Specifies an Android theme to apply to this Activity as soon as
14+
the Android process has started. This theme is visible to the user
15+
while the Flutter UI initializes. After that, this theme continues
16+
to determine the Window background behind the Flutter UI. -->
17+
<meta-data
18+
android:name="io.flutter.embedding.android.NormalTheme"
19+
android:resource="@style/NormalTheme"
20+
/>
21+
<!-- Displays an Android View that continues showing the launch screen
22+
Drawable until Flutter paints its first frame, then this splash
23+
screen fades out. A splash screen is useful to avoid any visual
24+
gap between the end of Android's launch screen and the painting of
25+
Flutter's first frame. -->
26+
<meta-data
27+
android:name="io.flutter.embedding.android.SplashScreenDrawable"
28+
android:resource="@drawable/launch_background"
29+
/>
30+
<intent-filter>
31+
<action android:name="android.intent.action.MAIN"/>
32+
<category android:name="android.intent.category.LAUNCHER"/>
33+
</intent-filter>
34+
</activity>
35+
<!-- Don't delete the meta-data below.
36+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
37+
<meta-data
38+
android:name="flutterEmbedding"
39+
android:value="2" />
40+
</application>
41+
</manifest>

0 commit comments

Comments
 (0)