中規模プロダクトにFlutterを採用する

 中規模プロダクトにFlutterを採用する

Df7d212b0cf922e1ef5d16765d3fac56?s=128

Naoto Horiguchi

July 16, 2019
Tweet

Transcript

  1. 8.

    தن໛ϓϩμΫτ͕৐Γӽ͑Δ΂͖՝ ୊ • ଞSDKͱͷ࿈ܞ • LINE SDK • ಺੡αʔϏεͱͷ࿈ܞ •

    ͓஌Βͤ഑৴αʔϏε • ଟݴޠԽ • ࣾ಺ͷ຋༁γεςϜͱͷ࿈ܞ
  2. 10.

    LINE SDK • LINE SDK for iOS • LINE SDK

    for Android • LINE SDK for Unity • LINE SDK for Flutter • https:/ /pub.dev/packages/flutter_line_sdk
  3. 12.

    main.dart import 'package:flutter_line_sdk/flutter_line_sdk.dart'; // Setup void main() { LineSDK.instance.setup("{CHANNEL ID}").then((_)

    { print("LineSDK Prepared"); // login(); }); runApp(App()); } // Login void login() async { try { final result = await LineSDK.instance.login(); print(result.userProfile.displayName); } on PlatformException catch (e) { // Error handling. print(e); } }
  4. 18.

    .strings to ARB ARB { "@@locale": "ja", "@@last_modified": "2019-07-09T14:53:30.474639", "helloText":

    "͜Μʹͪ͸ʂ{lastName} {firstName}", "@helloText": { "type": "text", "placeholders": { "lastName": {}, "firstName": {} } } }
  5. 21.

    intl 1.ॻ͘ String helloText(String lastName, String firstName) => Intl.message( '͜Μʹͪ͸ʂ${lastName}

    ${firstName}', name: 'helloText', args: [lastName, firstName], ); 2.ARBΛੜ੒ 3.ARBΛ຋༁ʹ·Θ͢ 4.ARB͔ΒଟݴޠԽ༻ͷίʔυΛੜ੒
  6. 23.

    ࣗಈੜ੒͞ΕΔίʔυ Message.dart import 'package:intl/intl.dart'; class Messages { String helloText(String lastName,

    String firstName) => Intl.message( '͜Μʹͪ͸ʂ${lastName} ${firstName}', name: 'helloText', args: [lastName, firstName], ); }
  7. 24.

    MixinͰศར ... import 'messages.dart'; class L10n with Messages { static

    L10n of(BuildContext context) { return Localizations.of<L10n>(context, L10n); } ...
  8. 26.

    એ఻ ! • LINE SDK ͸ͪ͜Β • https:/ /pub.dev/packages/flutter_line_sdk •

    https:/ /developers.line.biz/ja/docs/flutter-sdk/ • ϦϑΝϥϧ࠾༻ΛڧԽ͍ͯ͠·͢ • ΋͠LINEʹڵຯ͕͋Γ·ͨ͠Β͓ؾܰʹͲ͏ͧ