Запускается CameraActivity
This commit is contained in:
@@ -15,7 +15,7 @@ import io.flutter.plugin.common.MethodChannel.Result;
|
||||
|
||||
public class MainActivity extends FlutterActivity {
|
||||
|
||||
private static final String CHANNEL = "samples.flutter.io/battery";
|
||||
private static final String CHANNEL = "com.yourcompany.checker/scanner";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -25,14 +25,14 @@ public class MainActivity extends FlutterActivity {
|
||||
new MethodCallHandler() {
|
||||
@Override
|
||||
public void onMethodCall(MethodCall call, Result result) {
|
||||
|
||||
Log.d("kifio", "onMethodCall");
|
||||
startActivity(new Intent(MainActivity.this, CameraActivity.class));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void startScanner() {
|
||||
Log.d("kifio", "Start scanner");
|
||||
startActivity(new Intent(MainActivity.this, CameraActivity.class));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,11 @@
|
||||
android:id="@+id/rootLayout"
|
||||
android:background="@android:color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="Asdf"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -21,7 +21,7 @@ class ChatScreen extends StatefulWidget {
|
||||
|
||||
class ChatScreenState extends State<ChatScreen> {
|
||||
|
||||
static const platform = const MethodChannel('samples.flutter.io/battery');
|
||||
static const platform = const MethodChannel('com.yourcompany.checker/scanner');
|
||||
final List<ChatMessage> _messages = <ChatMessage>[];
|
||||
final TextEditingController _textController = new TextEditingController();
|
||||
|
||||
@@ -112,4 +112,4 @@ class ChatMessage extends StatelessWidget {
|
||||
])
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user