技術情報

FlutterのCheckboxListTileでCheckboxを左寄せにする方法

今回はFlutterでCheckboxListTileのチェックボックスを左に揃える方法を共有します。

CheckboxをCheckboxListTileの左に配置する方法

CheckboxListTile(
  controlAffinity: ListTileControlAffinity.leading,
)

controlAffinity:ListTileControlAffinity.leading を設定すると、checkboxを CheckboxListTile の左側に配置することができます。

CheckboxListTile(
  value: false,
  controlAffinity: ListTileControlAffinity.leading,
  onChanged: (bool? value) {  

  },
  title: Text("Learning Flutter?"),
)

結果

CheckboxListTile(
value: true,
onChanged: (bool? value) {  
 setState(() {
  //});
},
title: Text("Learning Web?"),
),
CheckboxListTile( 
value: false,
controlAffinity: ListTileControlAffinity.leading,
onChanged: (bool? value) {  
setState(() {//});
},
title: Text("Learning Flutter?"),
),

金曜担当 – Ami



7 useful VS Code extensions for PHP developers

Today, I would like to share 7 useful VS Code extensions for PHP developers. Let’s take a look at the following names of extensions.

  1. PHP Intelephense
  2. PHP Debug
  3. PHP Namespace Resolver
  4. Larave Snippets
  5. Laravel Blade Snippets
  6. Laravel Model Snippets
  7. Laravel gotoview

To install the above extensions, you just need to search and install these name in Extensions tab of VS code interface.

This is all for now. Hope you enjoy that.

By Asahi



Hey, GitHub

GitHub, owned by Microsoft, is experimenting with a new voice-based dialogue system for Copilot software. “Hello, GitHub!” Let programmers code without keyboards, just with their voice.

The new experiment will be available in Copilot, a $10/month AI tool GitHub released earlier this year to help developers code. Copilot suggests lines of code to the developer within the code editor, and can suggest the next line of code when the developer writes in an integrated development environment (IDE) such as Visual Studio Code, Neovim, or JetBrains IDE. Copilot can even suggest complete methods and complex algorithms along with boilerplate code to help with unit testing.

Credit: Githubnext

Adding voice coding is especially useful in accessibility scenarios. He can ask Copilot to do things like move to another line of code, or just use his voice to move to a method or block. You can also control Visual Studio Code with commands like “run program” and “toggle zen mode”. You can also request a code overview if you want an overview of how the code works.

This new voice system is being developed by GitHub Next, a team of researchers and engineers “investigating the future of software development.” There’s no guarantee it will eventually be released as a full product.

You can learn more about Hey Github here.

Yuuma



Flutterでタブバーウィジェットを追加する方法

FlutterのTabBarとTabBarViewを使って、タブバーウィジェットを追加する方法を紹介します。

まずはTabBarTabBarViewを使う前に,DefaultTabController()でウィジェットツリーをラップしておきます.

DefaultTabController( 
  initialIndex: 1, 
  length:3,
  child:Scaffold(
     
  )
)

initialIndexのところで開始するIndexを変更することができます。

initialIndex: 0, 

アプリ内でタブを表示したい場所にTabBar()を配置します。今の例では、AppBarの下で配置しています。

AppBar(
            
   bottom: TabBar(
      tabs: [
         Tab(text: "Home",),
         Tab(text: "About Us",),
         Tab(text: "Contact Us",)
         ]
        ),
      ),

次に、コンテンツを表示したい場所にTabBarView()を配置します。

TabBarView(
    children: [
        Container( 
            height: 400,
            color: Colors.red,
        ),
        Container( 
            height: 400,
            color: Colors.green,
        ),
        Container( 
          height: 400,
            color: Colors.white,
        )
    ]
)

金曜担当 – Ami



A bash script to clean RAM cache and Swap

Today, I would like to share a bash script to clean RAM cache and Swap. Let’s take a look at the following script.

echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Cleared Ram-cache and Swap'

Save the above codes as a file with .sh extension.

And give an execution permission to that file. Then you can clean RAM cache and swap by running that file.

Hope you enjoy that.

By Asahi




アプリ関連ニュース

お問い合わせはこちら

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

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

お問い合わせフォーム