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
| { | |
| notification: { | |
| title: `🚨 Emergency alert from ${name}`, | |
| body: "Click to view details", | |
| }, | |
| data: { | |
| route: "sos", | |
| payload: JSON.stringify(data || {}), | |
| click_action: "FLUTTER_NOTIFICATION_CLICK" | |
| }, |
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
| @GET("/volumes") | |
| fun searchBooks(@Query("userId") userId: String): Call<List<GBook>> | |
| @Headers("api-key: " + Constants.API_KEY) | |
| @GET("/zelish/user/getuser/{userId}/v1") | |
| Observable<UserData> getUser(@Path("userId") String userId); | |
| @GET("/zelish/v1/section/home/") | |
| Observable<SectionResponse> getSections(@Query("userId") String userId, @Query("pageNo") int pageNo, @Query("size") int size, @Query("country") String country); |
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
| //old methods | |
| flutter config --enable-windows-desktop | |
| flutter config --enable-macos-desktop | |
| flutter config --enable-linux-desktop | |
| flutter create . | |
| //add windows support to existing project | |
| flutter create --platforms=windows,macos,linux . |
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
| firebase login | |
| firebase projects:list | |
| firebase init hosting | |
| firebase use <projectid> | |
| firebase use --add | |
| firebase deploy --only hosting:adcentre |
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
| // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
| // © GuruprasadMeduri | |
| //@version=4 | |
| //***************GUIDE*********************************** | |
| //CPR - Applicable only for daily pivots | |
| //CPR - All 3 lines display enabled by default | |
| //CPR - Central Pivot line display cannot changed | |
| //CPR - Central Pivot is a blue line by default and can be changed from settings | |
| //CPR - Top Range & Bottom Ranage display can be changed from settings |
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
| val holidayViewModelKotlin = HolidayViewModelKotlin() | |
| holidayViewModelKotlin.getHolidays().observe(this, object: Observer<List<HolidayModelKotlin>> { | |
| override fun onChanged(t: List<HolidayModelKotlin>?) { | |
| holidayAdapterKotlin.addData(t!!) | |
| holidayAdapterKotlin.notifyDataSetChanged() | |
| } | |
| }) |
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
| class HolidayViewModelKotlin() : ViewModel() { | |
| var holidayRepoKotlin: HolidayRepoKotlin? = null | |
| var mutableLiveData: MutableLiveData<List<HolidayModelKotlin>>? = null | |
| init { | |
| holidayRepoKotlin = HolidayRepoKotlin() | |
| } | |
| fun getHolidays(): LiveData<List<HolidayModelKotlin>> { |
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
| class HolidayRepoKotlin { | |
| val TAG = javaClass.simpleName | |
| fun fetchHolidays(): MutableLiveData<List<HolidayModelKotlin>>{ | |
| var mutableList: MutableLiveData<List<HolidayModelKotlin>> = MutableLiveData() | |
| val apiInterface = MyApplication.getRetrofitClient().create(ApiInterface::class.java) | |
| apiInterface.getHolidaysKotlin().enqueue(object: Callback<List<HolidayModelKotlin>>{ |
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
| class HolidayModelKotlin{ | |
| var date:String? = null | |
| var name:String? = null | |
| } |
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 HolidayViewModel extends ViewModel { | |
| private HolidayRepo holidayRepo; | |
| private MutableLiveData<List<HolidayModel>> mutableLiveData; | |
| public HolidayViewModel(){ | |
| holidayRepo = new HolidayRepo(); | |
| } | |
| public LiveData<List<HolidayModel>> getHolidays() { |
NewerOlder