Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephen Oyebanji SteveOye

  • Nigeria
View GitHub Profile
View Error
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)
View curved_btn_nav_main.dart
@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],
@SteveOye
SteveOye / main.dart
Last active May 22, 2020
Bottom Navigation main.dart code
View main.dart
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
int _selectedPage = 0;
final _page = [
HomePage(),
HistoryPage(),
View page.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>[
View bottom_nav_import.dart
import './history.dart';
import './home.dart';
import './profile.dart';
import './support.dart';
View MainActivity.java
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;
View SignUpActivity.java
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;
View activity_main.xml
<?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">
You can’t perform that action at this time.