Skip to content

Instantly share code, notes, and snippets.

View SteveOye's full-sized avatar

Stephen Oyebanji SteveOye

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:orientation="vertical"
android:background="@drawable/bg"
tools:context=".MainActivity">
package com.druve.druve;
import android.annotation.SuppressLint;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
package com.druve.druve;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.view.GravityCompat;
import androidx.appcompat.app.ActionBarDrawerToggle;
import android.util.Log;
@SteveOye
SteveOye / main.dart
Last active May 22, 2020 01:33
Bottom Navigation main.dart code
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
int _selectedPage = 0;
final _page = [
HomePage(),
HistoryPage(),
import './history.dart';
import './home.dart';
import './profile.dart';
import './support.dart';
import 'package:flutter/material.dart';
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Bottom Navigation',
theme: ThemeData(primarySwatch: Colors.green),
home: Scaffold(
appBar: AppBar(
title: Text('Bottom Navigation'),
),
body: _page[_selectedPage],
2020-09-11 19:59:21.676 27135-27135/com.app.mujecab E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.mujecab, PID: 27135
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equalsIgnoreCase(java.lang.String)' on a null object reference
at com.app.taxiapp.helpers.prefhandler.SharedHelper.predictionInList(SharedHelper.java:351)
at com.app.taxiapp.helpers.prefhandler.SharedHelper.addrecentSearch(SharedHelper.java:331)
at com.app.taxiapp.view.activity.SearchPlacesActivity.savePredictionsToPreference(SearchPlacesActivity.java:500)
at com.app.taxiapp.view.activity.SearchPlacesActivity.access$1000(SearchPlacesActivity.java:70)
at com.app.taxiapp.view.activity.SearchPlacesActivity$9.onClicked(SearchPlacesActivity.java:485)
at com.app.taxiapp.view.adapter.AutoCompleteAdapter$1.onClick(AutoCompleteAdapter.java:68)
@SteveOye
SteveOye / issues.dart
Created October 29, 2020 14:00
issues
Performing hot restart...
Syncing files to device Redmi Note 7...
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.1+2/lib/firebase_auth.dart:10:8: Error: Error when reading '/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-2.1.1/lib/firebase_auth_platform_interface.dart': The system cannot find the path specified.
import 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart';
^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.18.1+2/lib/firebase_auth.dart:15:1: Error: Error when reading '/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_platform_interface-2.1.1/lib/firebase_auth_platform_interface.dart': The system cannot find the path specified.
export 'package:firebase_auth_platform_interface/firebase_auth_platform_interface.dart'
^
@SteveOye
SteveOye / pubspec.yaml
Last active January 25, 2023 23:18
notification with flutter
//add the plugins below dependencies
dependencies:
firebase_core: ^2.4.1
firebase_messaging: ^14.2.1
flutter_local_notifications: ^13.0.0