Skip to content

Commit

Permalink
delete LF from project and reupload
Browse files Browse the repository at this point in the history
  • Loading branch information
aratheunseen committed Jul 16, 2023
1 parent 9490a1b commit ba39965
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 7 deletions.
6 changes: 3 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (flutterVersionCode == null) {

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
flutterVersionName = '1.0.0'
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -47,8 +47,8 @@ android {
applicationId "com.openai.chatgpt"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 1 addition & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand All @@ -26,6 +25,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
File renamed without changes
65 changes: 65 additions & 0 deletions lib/browser.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class Browser extends StatefulWidget {
const Browser(
{Key? key, this.cookieManager, required this.title, required this.url})
: super(key: key);

final CookieManager? cookieManager;
final String title;
final String url;

@override
State<Browser> createState() => _BrowserState();
}

class _BrowserState extends State<Browser> {
String get title => widget.title;
String get url => widget.url;

@override
void initState() {
super.initState();
if (Platform.isAndroid || Platform.isIOS) {
WebView.platform = SurfaceAndroidWebView();
}
}

@override
Widget build(BuildContext context) {
// ignore: prefer_const_constructors
return SafeArea(
top: true,
bottom: true,
left: false,
right: false,
child: Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: () {
Navigator.pop(context);
},
),
title: Text(title),
backgroundColor: Colors.black87,
// elevation: 0,
// shape: const RoundedRectangleBorder(
// borderRadius: BorderRadius.vertical(
// bottom: Radius.circular(10),
// ),
// ),
),
body: WebView(
initialUrl: url,
javascriptMode: JavascriptMode.unrestricted,
gestureNavigationEnabled: true,
backgroundColor: Colors.white70,
),
),
);
}
}
25 changes: 25 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
import 'package:chatgpt/browser.dart';
import 'package:flutter/material.dart';

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'ChatGPT',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.black),
useMaterial3: true,
),
home: const Browser(
title: 'ChatGPT',
url: 'https://chat.openai.com',
),
);
}
}
3 changes: 1 addition & 2 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'package:chatgpt/main.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:chatgpt/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
Expand Down

0 comments on commit ba39965

Please sign in to comment.