Skip to content

Commit

Permalink
change home view
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavraviya committed Oct 15, 2023
1 parent 6c2c355 commit dc5f846
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 41 deletions.
22 changes: 5 additions & 17 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
channel: stable
revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
- platform: android
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
- platform: ios
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
- platform: web
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
- platform: windows
create_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
base_revision: 682aa387cfe4fbd71ccd5418b2c2a075729a1c66
create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2
base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2

# User provided section

Expand Down
4 changes: 1 addition & 3 deletions lib/config/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import 'dart:io';

class AppConfig {
static String name = "MoonLight";

static String shareTheAppMsg = "check out my website https://example.com";
static String rateThisAppLink =
"http://play.google.com/store/apps/details?id=com.rajtechnologies.StockMarketProfitCalculator";

// Google Mobile Ads Start
// Google Mobile Ads
static String get bannerAdUnitId {
if (Platform.isAndroid) {
return 'ca-app-pub-3940256099942544/6300978111';
Expand All @@ -16,6 +15,5 @@ class AppConfig {
} else {
throw UnsupportedError('Unsupported platform');
}
// Google Mobile Ads End
}
}
2 changes: 1 addition & 1 deletion lib/config/app_database.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AppDatabase {
static String database = "raviyatechnical.db";

// Tables
static String sqlTable = "items";
}
3 changes: 1 addition & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Remote Config
// await Firebase.initializeApp(); // if used then add on firebase remote config
// Google Mobile Ads Start
// Google Mobile Ads
if (Platform.isAndroid || Platform.isIOS) {
MobileAds.instance.initialize();
}
// Google Mobile Ads End
runApp(const MainApp());
}

Expand Down
2 changes: 0 additions & 2 deletions lib/views/example_mvc/sql_view.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:flutter/material.dart';
import 'dart:developer';

import '../../controllers/controllers.dart';
import '../../widgets/widgets.dart';

Expand Down
27 changes: 11 additions & 16 deletions lib/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class HomeView extends StatelessWidget {
children: [
Image.asset(
AppImage.appLogo,
width: 150,
width: 100,
),
const SizedBox(height: 10),
const Text(
Expand All @@ -49,31 +49,26 @@ class HomeView extends StatelessWidget {
Row(
children: [
Expanded(
child: Card(
child: TextButton(
onPressed: () => mlLaunchURL(AppLink.officialWebsite),
child: const Text("Official Website"),
),
child: ElevatedButton(
onPressed: () => mlLaunchURL(AppLink.officialWebsite),
child: const Text("Official Website"),
),
),
],
),
Row(
children: [
Expanded(
child: Card(
child: TextButton(
onPressed: () => Nav.toNamed(context, App.exampleMVC),
child: const Text("Example MVC"),
),
child: ElevatedButton(
onPressed: () => Nav.toNamed(context, App.exampleMVC),
child: const Text("Example MVC"),
),
),
const SizedBox(width: 10),
Expanded(
child: Card(
child: TextButton(
onPressed: () => Nav.toNamed(context, App.example),
child: const Text("Examples"),
),
child: ElevatedButton(
onPressed: () => Nav.toNamed(context, App.example),
child: const Text("Examples"),
),
),
],
Expand Down
30 changes: 30 additions & 0 deletions test/widget_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// 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:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:moonlight/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);

// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();

// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

0 comments on commit dc5f846

Please sign in to comment.