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
//example function body | |
Map<String, dynamic> fields = { | |
"data": filedValue, | |
}; | |
var request = http.MultipartRequest( | |
"POST", Uri.parse('url'), | |
); | |
request.files.add( |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
class PlatformSvg { | |
static Widget asset(String assetName, | |
{double width, | |
double height, | |
BoxFit fit = BoxFit.contain, | |
Color color, | |
alignment = Alignment.center, |
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 'javascript_util.dart'; | |
void callJavascriptFunction(){ | |
//callJavascriptFunctions("javascriptMethodName", ["arguments"]); example | |
callJavascriptFunctions("functionName", ["argument1","argument2","argument3"]); | |
} | |
void callJavascriptFunctionAndFetchData(){ | |
//fetchJavaScriptData("javascriptMethodName", callbackFunction(){},["arguments"]); example | |
fetchJavaScriptData("functionName", (resultFromJavascript){ |
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_performance_check/utils.dart'; | |
class PerformanceChartUI extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return _PerformanceChartUIState(); | |
} | |
} |
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 com.com.parthdave93.mock.Foo | |
import com.com.parthdave93.mock.FooInterface | |
import com.com.parthdave93.ownmockingmodule.MockDave | |
import org.mockito.Mockito | |
object CustomMockitoTestSuit { | |
@JvmStatic | |
fun main(args: Array<String>) { |
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
{ | |
"info": { | |
"name": "firebase", | |
"_postman_id": "e80f736a-f80e-8d91-436d-c633be4e23b2", | |
"description": "", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "https://fcm.googleapis.com/fcm/send", |
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 CircularLayoutManager extends LinearLayoutManager { | |
private static final int CIRCLE = 0; | |
private static final int ELLIPSE = 1; | |
private static final int MILLISECONDS_PER_INCH = 30; | |
private RecyclerView recyclerView; | |
private Rect recyclerBounds; | |
private int topOfFirstChild; |
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 MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
var arrayList = ArrayList<ItemModel>() | |
for (index in 0 .. 50){ | |
arrayList.add(ItemModel("test $index",false)) | |
} |
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
@BindingAdapter(value = {"bind:datePick", "bind:maxDate", "bind:minDate"}, requireAll = false) | |
public static void bindTextViewDateClicks(final TextView textView, final ObservableField<Date> date, final ObservableField<Date> maxDate, final ObservableField<Date> minDate) { | |
textView.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
selectDate(textView.getContext(), date, maxDate, minDate); | |
} | |
}); | |
} | |
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
@BindingAdapter(value = {"bind:textContentClickable", "bind:textContentClick"}, requireAll = true) | |
public static void onContentClick(TextView textView, String[] content, final View.OnClickListener clickListener) { | |
String originalText = textView.getText().toString(); | |
SpannableString ss = new SpannableString(originalText); | |
for (int index = 0; index < content.length; index++) { | |
int indexStarting = originalText.indexOf(content[index]); | |
int lastIndex = indexStarting + content[index].length(); | |
ss = applyClickToTextContent(ss, content[index], indexStarting, lastIndex, clickListener); | |
} | |
textView.setText(ss); |
NewerOlder