Запускается CameraActivity

This commit is contained in:
Ivan Murashov
2017-07-12 10:54:30 +03:00
parent 824f5142d9
commit 9612f7e3f5
3 changed files with 15 additions and 8 deletions

View File

@@ -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));
}
}

View File

@@ -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>

View File

@@ -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();