Note
This is a note.
Tip
This is a tip. (Supported since 14 Nov 2023)
Important
Crutial information comes here.
import 'dart:ui' as ui; | |
import 'package:flutter/widgets.dart'; | |
import 'package:wow_shopping/backend/backend.dart'; | |
enum DeviceType { | |
unknown, | |
phone, | |
tablet, | |
} |
func IsValidInterface(i interface{}) bool { | |
iv := reflect.ValueOf(i) | |
return iv.IsValid() && !iv.IsNil() | |
} |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
// MIT License | |
// | |
// Copyright (c) 2023 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
import 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:math'; | |
import 'package:firebase_messaging/firebase_messaging.dart'; | |
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; | |
import '../utils/logger/logger.dart'; | |
const _channelId = '<your_channel_id>'; |
// MIT License | |
// | |
// Copyright (c) 2024 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
import 'dart:io'; | |
import 'package:url_launcher/url_launcher.dart' as url_launcher; | |
import 'logger/logger.dart'; | |
class MapsLauncher { | |
static Uri createCoordinatesUri({ | |
required double latitude, | |
required double longitude, |
/// This will generate and add http-array-format from [array] to the [map] | |
/// with [httpArrayName] as the name of the array. | |
/// | |
/// If the [array] is null or empty will do nothing. | |
/// | |
/// e.g: | |
/// ``` | |
/// gAddHttpArrayFormatToMap(array: [14,55], httpArrayName: 'brand_id', map: someJsonMap); | |
/// // this will add to the [someJsonMap] parameter the following data | |
/// // {'brand_id[0]': 14, 'brand_id[1]': 55} |
// MIT License | |
// | |
// Copyright (c) 2023 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |