Skip to content

Instantly share code, notes, and snippets.

View followthemoney1's full-sized avatar
🏠
Working from home

Dmitry followthemoney1

🏠
Working from home
View GitHub Profile
@followthemoney1
followthemoney1 / .json
Created February 18, 2021 00:57
delete
{
"kind": "androidpublisher#inappproductsListResponse",
"inappproduct": [
{
"packageName": "com.leaditteam.mapotravelguide",
"sku": "4.99_test_e",
"status": "active",
"purchaseType": "managedUser",
"defaultPrice": {
"priceMicros": "4990000",
//
// ARVideoContainer.swift
// ARConcept
//
// Created by Dmitry Dyachenko on 2/1/21.
//
import SwiftUI
import AVKit
import SceneKit
/// datasetName = test_dev
static Future<void> generateLabels(String datasetName) async {
//const FUNCTIONS_URL = "us-central1-testproject-afd2f.cloudfunctions.net";
final response = await http.get(Uri.https(
FUNCTIONS_URL, "/generateLabelFile", {"dataset": datasetName}));
if (response.statusCode == 200) {
return Future.value();
} else {
throw Exception("Error while generating label file: " + response.body);
@followthemoney1
followthemoney1 / .dart
Created November 16, 2020 13:20
medium
bool calcOverflowClosestElement(
{@required List<SuggestionItem> line,
@required SuggestionItem current,
bool check = false}) {
for (SuggestionItem element in line) {
if (current.rect.intersect(element.rect).height > 0 &&
current.rect.intersect(element.rect).width > 0) {
if (current.rect.intersect(element.rect).height > 0) {
if (!check) {
current.y += element.rect.intersect(current.rect).height;
@followthemoney1
followthemoney1 / 1.dart
Created November 16, 2020 13:17
medium
rowsList.asMap().entries.forEach((rows) {
//нам нужно определить пересекается ли текущий элемент с элементом который слева или же сверху, если пересекается,
//тогда текущий элемент мы двигаем вниз или справо в зависимости
//mark: left
if (currentRow.iRow != 0) {
calcOverflowLeft(rowsList.elementAt(currentRow.iRow - 1), currentRow);
}
//mark: top
if (currentRow.iColumn != 0) {
calcOverflowTop(
@followthemoney1
followthemoney1 / .dart
Created November 16, 2020 13:09
medium
List<Widget> childerCards() {
List<Widget> cardsMatrixWidgets = [];
suggestionMatrix.entries.forEach((columns) {
int iColumn = columns.key;
List<SuggestionItem> rowsList = columns.value;
rowsList.asMap().entries.forEach((rows) {
///get all widgets
cardsMatrixWidgets.add(AnimatedPositioned.fromRect(
duration: Duration(milliseconds: widget.stackAnimatedDuration),
@followthemoney1
followthemoney1 / .dart
Created November 16, 2020 13:03
medium
suggestionMatrix = Map.from(suggestionMatrix.map((key, value) {
final endIndex = (rowCount * (key + 1));
return MapEntry(
key,
widget.items
.getRange(
rowCount * key,
endIndex < widget.items.length
? endIndex
: widget.items.length)
@followthemoney1
followthemoney1 / info
Last active November 18, 2020 17:03
brach share flutter example
1 файл receive.dart получение (тебя интересует listenDynamicLinks)
2 класс создание( тут все по гайдам, строчка 24 )
ДЛЯ ОТКРЫТИЯ САЙТА В СЛУЧАЕЕ НЕ УСТАНОВЛЕННОГО ПРИЛОЖЕНИЯ
linkProperties.addControlParameter("$desktop_url", "https://example.com/home");
@followthemoney1
followthemoney1 / mobile version
Created August 1, 2020 12:02
flutter GridView\ListView + ScrollView. Create scrollable content with GridView\ListView or scroll inside
mobile(bool isDesktop, NewsListState state) {
return Container(
child: CustomScrollView(
slivers: <Widget>[
SliverList(
delegate: SliverChildListDelegate([
Row(
children: [
Text(NewsLocalizations.of(context).titleNews,
style: Theme.of(context).textTheme.headline3)
/**
 * Created by Dmitry Diachenko on Feb 18, 2020
 * powered by leaditteam.com
 **/

//MARK: widget ext
extension WidgetExtension on Widget {
  Widget setVisibility(VisibilityFlag flag) {
    return MyVisibility(visibility: flag, child: this);