Other articles


  1. [Flutter] How to apply async function with map to each element of list?

    How to apply an async function with .map() to each element of a list.

    Thing you want to do

    As a simple example, consider code that converts a Firestore DocumentSnapshot into a model class.

    List<Model> models = docs.map((doc) => _fromDoc(doc)).toList();
    

    I think it's common to prepare a …

    read more

    There are comments.

  2. [Flutter] Easy use enum in flutter version 3

    enum HogeType {
      hoge('ほげ', 'hoge'),
      fuga('ちが', 'fuga'),
      piyo('γ΄γ‚ˆ', 'piyo'),
      foo('ちー', 'foo'),
      bar('ばー', 'bar'),
      none('', '');
    
      const HogeType(this.name, this.type);
      final String name;
      final String type;
    
      static HogeType fromType(String from) {
        return HogeType.values.firstWhere(
          (value) {
            return value.type == from;
          },
          orElse …
    read more

    There are comments.

  3. [Flutter] How to sleep ?

    Sleep with Flutter

    It's a small story.

    It's a memorandum because I google it every time πŸ˜…

    How to pause or delay processing in Flutter? (Like sleep in PHP)

    • Pause processing by specifying the number of seconds
    import 'dart:io';
    
    sleep(Duration(seconds: 1));
    
    • Run an empty asynchronous process specifying the …
    read more

    There are comments.

  4. [Flutter] Gradient Text Widget

    Gradient Text widget

    import 'package:flutter/material.dart';
    
    class GradientText extends StatelessWidget {
      const GradientText(
        this.text, {
        required this.gradient,
        this.style,
      });
    
      final String text;
      final TextStyle? style;
      final Gradient gradient;
    
      @override
      Widget build(BuildContext context) {
        return ShaderMask(
          blendMode: BlendMode.srcIn,
          shaderCallback: (bounds) => gradient.createShader(
            Rect.fromLTWH(0, 0, bounds.width …
    read more

    There are comments.

  5. Xcode Shortcuts to Boost Your Productivity

    Assistant editors, Minimap, SwiftUI previews, fix all errors, multiple cursors, and more

    Developers often spend most of their working hours on an IDE. If you’re an iOS, macOS, tvOS or watchOS developer, you’d probably be closer to your Xcode IDE than anything else at work.

    I’ve often …

    read more

    There are comments.

  6. Implementation Universal/AppLink in both iOS and Android

    Android

    1. Host a website with https then upload config files: https://your-web-host-name/.well-known/assetlinks.json
    [
      {
        "relation": ["delegate_permission/common.handle_all_urls"],
        "target": {
          "namespace": "android_app",
          "package_name": "<android-app-package-name>",
          "sha256_cert_fingerprints": ["<android-fingerprint>"]
        }
      }
    ]
    

    get android-debug-fingerprint from

    keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

    1. Add code to android/app/src/main/AndroidManifest.xml
    <activity ...>
      ...
      <intent-filter …
    read more

    There are comments.

Page 1 / 3 »

Links

Social