技術情報

Flutterで水平方向の点線を作成する方法

Flutterで水平のダッシュや点線がうまく描けない場合は、以下の例を参照してください。

線を引きたいときは、CustomPaint機能を使って、いろいろな線を描いてみましょう。

水平線はCanvas上でのdrawLineという機能でoffsetを設定され、描画されます。

コード

return Scaffold(
      appBar: AppBar(
        title: Text("Horizontal Dotted/Dash Line"), 
        backgroundColor: Colors.blueAccent, 
      ),
      body: Container(
        color: Colors.white,
        height: 150.0, 
        child: Center(
          child:CustomPaint(painter: DrawDottedhorizontalline()),
        ),
      ),
    );
class DrawDottedhorizontalline extends CustomPainter {
  late Paint _paint;
  DrawDottedhorizontalline() {
    _paint = Paint();
    _paint.color = Colors.black; //dots color
    _paint.strokeWidth = 2; //dots thickness
    _paint.strokeCap = StrokeCap.square; //dots corner edges
  }

  @override
  void paint(Canvas canvas, Size size) {
    for (double i = -300; i < 300; i = i + 15) {
      // 15 is space between dots
      if (i % 2 == 0) {
        canvas.drawLine(Offset(i, 0), Offset(i + 20, 0.0), _paint);
      }
    }
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) {
    return false;
  }
}

結果

金曜担当 – Ami



Five most used PHP Testing frameworks

Today, I would like to share about some popular PHP testing frameworks.

There are many automated testing frameworks in PHP. Among them, I will list down 5 most used frameworks. Let’s take a look.

1. PHPUnit

2. PHPSPec

3. StoryPlayer

4. Codeception

5. Behat

You can check by clicking each list item for more details.

This is all for now. Hope you enjoy that.

By Asahi



Flutterでアドレス、件名、本文のあるメールアプリケーションを開く方法

今回は自分のメールアプリをFlutterの方から開く方法を紹介します。

まずは、pubspec.yamlで開く必要があるpackageを追加します。

 url_launcher: ^6.1.5

アドレス、件名、本文を指定してメールアプリを開く方法

String email = Uri.encodeComponent("mail@fluttercampus.com");
String subject = Uri.encodeComponent("Nice to meet u Flutter Team");
String body = Uri.encodeComponent("Hello!I'm Flutter Developer");
Uri mail = Uri.parse("mailto:$email?subject=$subject&body=$body");
if (await launchUrl(mail)) {
    
}else{
    
}

ボタンをタップする時、上記のことをコールます。

ElevatedButton(
  onPressed: ()async{
       //上記のことをコール
    },
child: Text("今すぐメールを送る")
);



Emmetの使用(3)

今回はHTMLマークアップを効率的に記述することができる
Emmet(エメット)を紹介したいと思います。
本記事は前回の「Emmetの使用(2)」の続きとなります。

続きを読む

A useful library for automating emails in Node JS

Today I would like to share about a library that can be used for handling email automation with Node JS. Let’s take a look.

This useful library is Candymail. Candymail is an open-source NPM library. It can trigger and send multiple email sequences with a single JSON file. This library is very easy to use and flexible for handling email processes.

You can check it out here for more details. There is also github repo.

Hope you enjoy that for today.

By Asahi




アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム