This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main(){ | |
| print("Hi?!"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MainActivity3 extends AppCompatActivity { | |
| ImageView iv; | |
| Bitmap imageBitmap; | |
| Button button; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main3); | |
| ConstraintLayout c = (ConstraintLayout) findViewById(R.id.main3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:typed_data'; | |
| import 'package:flutter/gestures.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| void main(){ | |
| WidgetsFlutterBinding.ensureInitialized(); | |
| GestureBinding.instance.resamplingEnabled = true; | |
| return runApp(MaterialApp(home: MyApp(),)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.doyle.andtest; | |
| import android.content.Intent; | |
| import android.graphics.Bitmap; | |
| import android.os.Bundle; | |
| import android.provider.MediaStore; | |
| import androidx.annotation.NonNull; | |
| import java.io.ByteArrayOutputStream; | |
| import io.flutter.embedding.android.FlutterActivity; | |
| import io.flutter.embedding.engine.FlutterEngine; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Future<void> _handlerSetting() async => await this.server!.listen((HttpRequest event) async { | |
| if (this._handler.isEmpty) return; | |
| for (HandlerModel _hmodel in this._handler) { | |
| Function? c = _hmodel.cb; | |
| String? path = _hmodel.path; | |
| String? method = _hmodel.method; | |
| if (event.uri.path.toString() == path && event.method == method) { | |
| await c!(event, event.response); | |
| await event.response.close(); | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Future<void> post(String path, Function(HttpRequest req, HttpResponse res) cb, {dynamic? data = null}) async => this._handler.add(new HandlerModel(path: path, method: "POST", cb: cb, data: data)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static Future<void> doRender({required HttpRequest req, required HttpResponse res, required String path, Map<String, String>? data}) async { | |
| final File _file = File(path); | |
| final String _readData = await _file.readAsString(); | |
| String _result = _readData; | |
| if (data != null) { | |
| data.keys.toList().forEach((String key) { | |
| _result = _result.replaceAll("<do>$key</do>", data[key].toString()); | |
| _result = _result.replaceAll("<do> $key </do>", data[key].toString()); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Future<void> get(String path, Function(HttpRequest req, HttpResponse res) cb) async => this._handler.add(new HandlerModel(path: path, method: "GET", cb: cb)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:andtest/Logic.dart'; | |
| import 'dart:typed_data'; | |
| class ProfilePage extends StatefulWidget { | |
| @override | |
| _ProfilePageState createState() => _ProfilePageState(); | |
| } | |
| class _ProfilePageState extends State<ProfilePage> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:typed_data'; | |
| import 'package:flutter/services.dart'; | |
| class CameraLogic{ | |
| // 촬영한 이미지를 저장하는 변수 | |
| Uint8List camData; | |
| // 촬영 기능 실행 | |
| Future<void> camActionChannel() async => await new MethodChannel("app.james.cam/cam").invokeMethod<void>("cam"); | |
| // 촬영한 이미지를 받음 | |
| void channelOnData(Function(Uint8List) logic) => new MethodChannel("app.james.cam/cam2").setMethodCallHandler((call){ |
OlderNewer