This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventDataSourceFactory extends DataSource.Factory { | |
private String date; | |
private Context context; | |
private MutableLiveData<PageKeyedDataSource<Integer, EventsItem>> liveDataSource = new MutableLiveData<>(); | |
public EventDataSourceFactory(String date, Context context) { | |
this.date = date; | |
this.context = context; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventDataSource extends PageKeyedDataSource<Integer, EventsItem> { | |
public static final int FIRST_PAGE = 0; | |
private RestRepository restRepository; | |
private String date; | |
private CompositeDisposable disposable; | |
private MutableLiveData<Resource> resource = new MutableLiveData<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.unitor.foodhub.paging.daily; | |
import android.content.Context; | |
import android.util.Log; | |
import androidx.annotation.NonNull; | |
import androidx.lifecycle.MutableLiveData; | |
import androidx.paging.PageKeyedDataSource; | |
import com.unitor.foodhub.data.Resource; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventDataSource extends PageKeyedDataSource<Integer, EventsItem> { | |
private String date; | |
private int sourceIndex = 0; | |
private Context context; | |
private ApiInterface apiInterface; | |
private MutableLiveData<Resource> liveData = new MutableLiveData<>(); | |
private MutableLiveData<List<EventsItem>> itemMutableLiveData = new MutableLiveData<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_calendar_carousel/classes/event.dart'; | |
import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart'; | |
import 'package:hub_food_park/utils/constants.dart'; | |
import 'package:intl/intl.dart'; | |
class FirstScreen extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
// TODO: implement createState |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Contact { | |
private String name; | |
private int id; | |
private String phoneNumber; | |
@Override | |
public String toString() { | |
return "Contact{" + | |
"name='" + name + '\'' + | |
", id=" + id + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Animal { | |
private String breed; | |
private String name; | |
private String color; | |
private int age; | |
private int size; | |
public Animal(String breed, String name, String color, int age, int size) { | |
this.breed = breed; | |
this.name = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
public class Main { | |
public static void main(String[] args) { | |
Person mPerson = new Person("Sayeed","Robin","0134234432","[email protected]"); | |
mPerson.printName(); | |
System.out.println(mPerson.getEmailAddress()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ExtraCurriculum { | |
void debate(); | |
void takeQuiz(); | |
void speech(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_calendar_carousel/classes/event.dart'; | |
import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart'; | |
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | |
import 'package:http/http.dart' as http; | |
import 'package:hub_food_park/network/network_helper.dart'; | |
import 'package:hub_food_park/pojos/event/event_item.dart'; | |
import 'package:hub_food_park/pojos/event/event_result.dart'; |
OlderNewer