mirror of
https://github.com/flutter/samples.git
synced 2026-03-31 16:55:34 +00:00
Flutter 3.29 beta (#2571)
This commit is contained in:
12
pedometer/src/pedometerHelper.m
Normal file
12
pedometer/src/pedometerHelper.m
Normal file
@@ -0,0 +1,12 @@
|
||||
#import "pedometerHelper.h"
|
||||
#import <CoreMotion/CoreMotion.h>
|
||||
#import <CoreMotion/CMPedometer.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
// TODO(https://github.com/dart-lang/native/issues/835): Generate this wrapper
|
||||
// automatically.
|
||||
CMPedometerHandler wrapCallback(CMPedometerHandler callback) {
|
||||
return [^(CMPedometerData *data, NSError *error) {
|
||||
return callback([data retain], [error retain]);
|
||||
} copy];
|
||||
}
|
||||
Reference in New Issue
Block a user