https://flutter.dev/docs/development/ui/widgets/cupertino

 

Cupertino (iOS-style) widgets

 

flutter.dev

showCupertinoModalPopup(
  context: context,
  builder: (BuildContext context) => CupertinoActionSheet(
      title: const Text('Choose Options'),
      message: const Text('Your options are '),
      actions: <Widget>[
        CupertinoActionSheetAction(
          child: const Text('One'),
          onPressed: () {
            Navigator.pop(context, 'One');
          },
        ),
        CupertinoActionSheetAction(
          child: const Text('Two'),
          onPressed: () {
            Navigator.pop(context, 'Two');
          },
        )
      ],
      cancelButton: CupertinoActionSheetAction(
        child: const Text('Cancel'),
        isDefaultAction: true,
        onPressed: () {
          Navigator.pop(context, 'Cancel');
        },
      )),
);

특이한 것은 안드로이드에서 cupertino 디자인이 유지된다는 점이다.

ㅋ 재밌네

'프로그래밍 > Flutter' 카테고리의 다른 글

Flutter SNS Login Package  (0) 2020.08.24
Shared Preferences  (1) 2020.04.28
image shake animation  (0) 2020.04.04
flutter_staggered_grid_view  (0) 2020.03.15
Flutter Search-bar 구현  (0) 2020.03.13

 

import 'dart:math';

import 'package:flutter/material.dart';
import 'package:vector_math/vector_math_64.dart';

class ShakeAnimation extends StatefulWidget {
  @override
  _ShakeAnimationState createState() => _ShakeAnimationState();
}

class _ShakeAnimationState extends State<ShakeAnimation>
    with SingleTickerProviderStateMixin {
  AnimationController animationController;
  Animation<double> animation;

  @override
  void initState() {
    super.initState();
    animationController = AnimationController(
      vsync: this,
      duration: Duration(seconds: 5),
    )..addListener(() => setState(() {}));

    animation = Tween<double>(
      begin: 50.0,
      end: 120.0,
    ).animate(animationController);

    animationController.forward();
  }

  Vector3 _shake() {
    double progress = animationController.value;
    double offset = sin(progress * pi * 10.0);
    return Vector3(offset * 4, 0.0, 0.0);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text("Shake animation example")),
      body: Center(
        child: Transform(
          transform: Matrix4.translation(_shake()),
          child: FlutterLogo(
            size: 60.0,
          ),
        ),
      ),
    );
  }
}

'프로그래밍 > Flutter' 카테고리의 다른 글

Shared Preferences  (1) 2020.04.28
Cupertino ActionSheet  (0) 2020.04.05
flutter_staggered_grid_view  (0) 2020.03.15
Flutter Search-bar 구현  (0) 2020.03.13
플러터 - 크로스 플랫폼  (1) 2020.03.11

 

I had the same problem with Xcode 11 but I just updated CocoaPods and it worked.

  1. Update CocoaPods to latest version with sudo gem install cocoapods
  2. Run pod install again

'프로그래밍 > ios(Swift)' 카테고리의 다른 글

Notification Center  (0) 2020.03.22
[Objective-C] nil vs null  (0) 2020.03.21

'촬영 일기' 카테고리의 다른 글

5:00 am  (0) 2020.08.18
はなみ  (0) 2020.03.31

 

 

 

 

 

 

'촬영 일기' 카테고리의 다른 글

5:00 am  (0) 2020.08.18
벛꽃  (0) 2020.03.31

+ Recent posts