bug fixed
@@ -0,0 +1 @@
|
||||
0f1c8bb9795d8001a30794af192ea11b
|
||||
BIN
neowallet_mobile/build/ios/Debug-iphonesimulator/App.framework/App
Executable file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"assets/translations/en.json":["assets/translations/en.json"],"assets/translations/th.json":["assets/translations/th.json"],"images/17.png":["images/17.png"],"images/CATHAY PAY LOGO2 1.png":["images/CATHAY PAY LOGO2 1.png"],"images/Group 38123.png":["images/Group 38123.png"],"images/LOGO.gif":["images/LOGO.gif"],"images/LOGO.png":["images/LOGO.png"],"images/LoginBG.png":["images/LoginBG.png"],"images/LogoV1-3.png":["images/LogoV1-3.png"],"images/TCH PAY-2.png":["images/TCH PAY-2.png"],"images/bank/bookbank.png":["images/bank/bookbank.png"],"images/bank/kbank.png":["images/bank/kbank.png"],"images/bank/krungthai.png":["images/bank/krungthai.png"],"images/bank/scb.png":["images/bank/scb.png"],"images/bank/visa_master.png":["images/bank/visa_master.png"],"images/ci-qrpayment-img-01.png":["images/ci-qrpayment-img-01.png"],"images/home/1.home.png":["images/home/1.home.png"],"images/home/1.png":["images/home/1.png"],"images/home/15.png":["images/home/15.png"],"images/home/17.png":["images/home/17.png"],"images/home/19.png":["images/home/19.png"],"images/home/2.png":["images/home/2.png"],"images/home/2.scan.png":["images/home/2.scan.png"],"images/home/3.all.png":["images/home/3.all.png"],"images/home/3.png":["images/home/3.png"],"images/home/4.png":["images/home/4.png"],"images/home/5.png":["images/home/5.png"],"images/home/6.png":["images/home/6.png"],"images/home/Banner.png":["images/home/Banner.png"],"images/home/Head.png":["images/home/Head.png"],"images/home/Mask group.png":["images/home/Mask group.png"],"images/home/icon_plus.png":["images/home/icon_plus.png"],"images/home/icon_qr.png":["images/home/icon_qr.png"],"images/home/lang_1.png":["images/home/lang_1.png"],"images/home/lang_2.png":["images/home/lang_2.png"],"images/home/lang_20.png":["images/home/lang_20.png"],"images/home/lang_21.png":["images/home/lang_21.png"],"images/home/upload.png":["images/home/upload.png"],"images/icon_cathey.png":["images/icon_cathey.png"],"images/image qr.png":["images/image qr.png"],"images/menu/1.png":["images/menu/1.png"],"images/menu/14.png":["images/menu/14.png"],"images/menu/15.png":["images/menu/15.png"],"images/menu/16.png":["images/menu/16.png"],"images/menu/2.png":["images/menu/2.png"],"images/menu/22.png":["images/menu/22.png"],"images/menu/23.png":["images/menu/23.png"],"images/menu/24.png":["images/menu/24.png"],"images/menu/25.png":["images/menu/25.png"],"images/menu/26.png":["images/menu/26.png"],"images/menu/27.png":["images/menu/27.png"],"images/menu/3.png":["images/menu/3.png"],"images/menu/31.png":["images/menu/31.png"],"images/menu/32.png":["images/menu/32.png"],"images/neo_backgroup.png":["images/neo_backgroup.png"],"images/neopay_logo.png":["images/neopay_logo.png"],"images/passport.png":["images/passport.png"],"images/prompt.png":["images/prompt.png"],"images/qr.png":["images/qr.png"],"images/qr_code.png":["images/qr_code.png"],"images/register/idcard.png":["images/register/idcard.png"],"images/register/passport.png":["images/register/passport.png"],"images/register/passport_en.png":["images/register/passport_en.png"],"images/register/passport_th.png":["images/register/passport_th.png"],"images/register/rubber.png":["images/register/rubber.png"],"images/register/takepicture.png":["images/register/takepicture.png"],"images/register/thaicard_en.png":["images/register/thaicard_en.png"],"images/register/thaicard_th.png":["images/register/thaicard_th.png"],"images/transferpoint/aot.png":["images/transferpoint/aot.png"],"images/transferpoint/kcc.png":["images/transferpoint/kcc.png"],"images/transferpoint/mis.png":["images/transferpoint/mis.png"],"images/transferpoint/the1.png":["images/transferpoint/the1.png"],"images/usa.png":["images/usa.png"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf":["packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf"],"packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf":["packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf"],"packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf":["packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf"]}
|
||||
@@ -0,0 +1 @@
|
||||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"family":"packages/font_awesome_flutter/FontAwesomeBrands","fonts":[{"weight":400,"asset":"packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf"}]},{"family":"packages/font_awesome_flutter/FontAwesomeRegular","fonts":[{"weight":400,"asset":"packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf"}]},{"family":"packages/font_awesome_flutter/FontAwesomeSolid","fonts":[{"weight":900,"asset":"packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf"}]}]
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"Welcome":"Welcome",
|
||||
"to CATHAY PAY":"to NEO PAY",
|
||||
"Log In":"Log In",
|
||||
"Register":"Register",
|
||||
"Username":"Username",
|
||||
"Password":"Password",
|
||||
"Next":"Next",
|
||||
"Please fill in all information.":"Please fill in all information.",
|
||||
"Forgot Password":"Forgot Password",
|
||||
"Confirm":"Confirm",
|
||||
"Enter 6-digit PIN":"Enter 6-digit PIN",
|
||||
"Please check your Internet.":"Please check your Internet.",
|
||||
"Verify your identity":"Verify your identity",
|
||||
"Scan ID card/Passport":"Scan ID card / Passport",
|
||||
"personal information":"personal information",
|
||||
"Face Scan":"Face Scan",
|
||||
"Take your photo with your ID card/passport":"Take your photo with your ID card / passport",
|
||||
"Card front":"Card front",
|
||||
"Back of card":"Back of card",
|
||||
"Start scanning":"Start scanning",
|
||||
"Your information will be kept confidential in accordance with our Privacy Policy.":"Your information will be kept confidential in accordance with our Privacy Policy.",
|
||||
"Scan the ID card":"Scan the ID card/Passport",
|
||||
"Scan ID card":"Scan the ID card",
|
||||
"Scan Passport":"Scan the Passport",
|
||||
"take a photo":"take a photo",
|
||||
"Scan the back of your ID card":"Scan the back of your ID card/Immigration stamp",
|
||||
"National ID card/passport number":"National ID card/passport number",
|
||||
"Back of card number":"Back of card number",
|
||||
"Title":"Title",
|
||||
"Mr.":"Mr.",
|
||||
"Mrs.":"Mrs.",
|
||||
"Miss":"Miss",
|
||||
"Not specified":"Not specified",
|
||||
"Thai name/english name in passport":"Thai name/english name in passport",
|
||||
"English name":"English name",
|
||||
"nationality":"nationality",
|
||||
"Date of birth":"Date of birth",
|
||||
"Mobilephone number":"Mobilephone number",
|
||||
"Address as per ID card":"Address as per ID card",
|
||||
"Current address":"Current address",
|
||||
"profession":"profession",
|
||||
"Name of workplace":"Name of workplace",
|
||||
"Work address":"Work address",
|
||||
"Purpose of using the service":"Purpose of using the service",
|
||||
"Pay for products and services":"Pay for products and services",
|
||||
"Accepting payment for products and services":"Accepting payment for products and services",
|
||||
"Both Payment and Acceping payment":"Both Payment and Acceping payment",
|
||||
"Spend at participating merchants":"Spend at participating merchants",
|
||||
"Please enter the OTP code.":"Please enter the OTP code.",
|
||||
"The code will be sent to":"The code will be sent to ",
|
||||
"within the specified time":"within the specified time",
|
||||
"Please fill in":"Please fill in ",
|
||||
"Accept the Privacy Policy":"Accept the Privacy Policy",
|
||||
"accept":"accept",
|
||||
"Take your photo with your ID card / passport":"Take your photo with your ID card / passport",
|
||||
"Sign your name":"Sign your name",
|
||||
"Your Name":"Your Name",
|
||||
"Member ID":"Member ID",
|
||||
"Balance":"Balance",
|
||||
"Point":"Point",
|
||||
"Wallet Topup":"Wallet Topup",
|
||||
"Pay":"Pay",
|
||||
"Receive Money":"Receive Money",
|
||||
"Transfer Money":"Transfer Money",
|
||||
"Promotions for you":"Promotions for you",
|
||||
"Baht":"Baht",
|
||||
"Create Transaction":"Create Transaction",
|
||||
"Create QR for Topup":"Create QR for Topup",
|
||||
"Create QR code to specify the amount":"Create QR code to specify the amount",
|
||||
"Create QR code":"Create QR code",
|
||||
"Transaction History":"Transaction History",
|
||||
"Scan QR code to pay via mobile app":"Scan QR code to pay via mobile app",
|
||||
"Show QR Code to get paid":"Show QR Code to get paid",
|
||||
"Specify the amount":"Specify the amount",
|
||||
"Save QR":"Save QR",
|
||||
"PromptPay":"PromptPay",
|
||||
"Transfer money via PromptPay":"Transfer money via PromptPay",
|
||||
"Enter the recipient's phone number":"Enter the recipient's phone number",
|
||||
"Amount transferred":"Amount transferred",
|
||||
"Scan via QR code":"Scan via QR code",
|
||||
"ประเภทของงาน":"Jobs Type",
|
||||
"อาชีพในภาครัฐ":"Government official",
|
||||
"อาชีพในธุรกิจอื่นๆ":"Other Business Occupations",
|
||||
"อาชีพด้านศิลปะ ความบันเทิงและกีฬา":"Arts, Entertainment and Sports Occupations",
|
||||
"ตำแหน่งผู้บริหารหรือเจ้าของธุรกิจ":"Executive or Business Owner Positions",
|
||||
"ผู้พิพากษา/อัยการ":"Judge/Prosecutor",
|
||||
"ตำรวจ/ทหาร":"Police/Military",
|
||||
"นักการเมือง":"Politician",
|
||||
"นักการเมืองท้องถิ่น":"Local politicians",
|
||||
"นักเรียน/นักศึกษา":"Student",
|
||||
"พนักงานบริษัท":"Company employee",
|
||||
"พนักงานรัฐวิสาหกิจ":"State Enterprise Employees",
|
||||
"รับจ้างทั่วไป":"General Employment",
|
||||
"อาชีพอิสระ":"Freelance",
|
||||
"บริษัทจัดหางานสำหรับแรงงานต่างชาติ":"Foreign Worker Recruitment Agency",
|
||||
"ผู้ค้าของเก่า":"Antique Dealers",
|
||||
"ผู้ค้าอัญมณี/ผู้ค้าทอง":"Gem Dealers/Gold Dealers",
|
||||
"ผู้ค้าอาวุธและกระสุนปืน":"Arms and Ammunition Dealers",
|
||||
"ผู้ผลิตอาวุธและกระสุนปืน":"Arms and Ammunition Manufacturers",
|
||||
"ธุรกิจคาสิโน/บ่อนการพนัน":"Casino/Gambling Business",
|
||||
"อาชีพอื่นๆ":"Other Occupations",
|
||||
"ศิลปิน":"Artists",
|
||||
"บุคลากรในวงการบันเทิง":"Entertainment Industry Personnel",
|
||||
"อินฟลูเอ็นเซอร์/นักรีวิว":"Influencers/Reviewers",
|
||||
"สถานบันเทิง":"Entertainment Venues",
|
||||
"นักกีฬา":"Athletes",
|
||||
"เจ้าของกิจการ":"Business Owners",
|
||||
"เจ้าของสำนักงานกฏหมาย":"Law Firm Owners",
|
||||
"ผู้บริหาร/ผู้อำนวยการ":"Executives/Directors",
|
||||
"บัตรประชาชน":"Thai ID Card",
|
||||
"พาสปอร์ต":"Passport",
|
||||
"Password ต้องมีตัวเลขและตัวอักษรภาษาอังกฤษอย่างน้อย 1 ตัว":"Password must contain at least 1 number and 1 English letter.",
|
||||
"Password ต้องมากกว่า 6 ตัว":"Password must be more than 6 characters.",
|
||||
"Password ไม่ตรงกัน":"Passwords do not match",
|
||||
"บัตรประชาชนไม่ถูกต้อง":"The ID card number is incorrect.",
|
||||
"เบอร์มือถือไม่ถูกต้อง":"Mobile number is invalid.",
|
||||
"Email ไม่ถูกต้อง":"Email is invalid",
|
||||
"หน้าหลัก":"Home",
|
||||
"สแกน":"Scan",
|
||||
"ทั้งหมด":"All",
|
||||
"สแกน QR Code NEO PAY":"Scan QR Code NEO PAY",
|
||||
"สแกน Thai QR Code":"Scan Thai QR Code",
|
||||
"แอปพลิเคชันทั้งหมด":"All Application",
|
||||
"สมาชิก NEO PAY":"Neo Wallet",
|
||||
"บัญชีธนาคาร":"Bank Account",
|
||||
"โอนเงินให้สมาชิก NEO PAY":"Transfer to NEO WALLET",
|
||||
"เบอร์โทรศัพท์ผู้รับ":"Mobile Phone Number/ Wallet ID",
|
||||
"ชื่อ":"Receiver Name",
|
||||
"เบอร์โทรศัพท์":"Phone Number",
|
||||
"จำนวนเงินที่โอน / จ่าย":"Amount",
|
||||
"ใช้แต้ม NEO PAY แทนเงินสด":"Pay by Point",
|
||||
"คะแนนของคุณ":"Your Point",
|
||||
"แต้ม":"Point",
|
||||
"ยอดเงินทั้งหมด":"Total Amount",
|
||||
"1 แต้ม = 10 สตางค์":"1 Point = 10 Satang",
|
||||
"กลับสู่หน้าหลัก":"Back",
|
||||
"ยกเลิก":"Cancel",
|
||||
"ชื่อบัญชี":"Account Name",
|
||||
"จำนวนเงิน":"Amount",
|
||||
"หมายเลขสมาชิก":"Member Number",
|
||||
"QR ของคุณได้ถูกสร้างแล้ว\nผู้จ่ายสามารถสแกนเพื่อเติมเงินได้": "Your QR code has been generated \nPayer can scan to top up."
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"Welcome":"ยินดีต้อนรับ",
|
||||
"to CATHAY PAY":"สู่ NEO PAY",
|
||||
"Log In":"เข้าสู่ระบบ",
|
||||
"Register":"สมัครสมาชิก",
|
||||
"Username":"ผู้ใช้งาน",
|
||||
"Password":"รหัสผ่าน",
|
||||
"Next":"ต่อไป",
|
||||
"Please fill in all information.":"กรุณากรอกข้อมูล",
|
||||
"Forgot Password":"ลืมรหัสผ่าน",
|
||||
"Confirm":"ยืนยัน",
|
||||
"Enter 6-digit PIN":"รหัส PIN 6 หลัก",
|
||||
"Please check your Internet.":"กรุณาตรวจสอบ Internet ของท่าน",
|
||||
"Verify your identity":"ยืนยันตัวตน",
|
||||
"Scan ID card/Passport":"สแกนบัตรประชาชน / พาสปอร์ต",
|
||||
"Scan ID card":"สแกนบัตรประชาชน",
|
||||
"Scan Passport":"สแกนพาสปอร์ต",
|
||||
"personal information":"ข้อมูลส่วนตัว",
|
||||
"Face Scan":"สแกนใบหน้า",
|
||||
"Take your photo with your ID card/passport":"ถ่ายคู่บัตรประชนชน / พาสปอร์ต",
|
||||
"Card front":"หน้าบัตร",
|
||||
"Back of card":"หลังบัตร",
|
||||
"Start scanning":"เริ่มต้นสแกน",
|
||||
"Your information will be kept confidential in accordance with our Privacy Policy.":"ข้อมูลของท่านจะถูกเก็บรักษาไว้เป็นความลับตามนโยบายการจัดการข้อมูลส่วนบุคคล",
|
||||
"Scan the ID card":"สแกนหน้าบัตรประชาชน/พาสปอร์ต",
|
||||
"take a photo":"ถ่ายรูป",
|
||||
"Scan the back of your ID card":"สแกนหลังบัตรประชาชน/พาสปอร์ต",
|
||||
"National ID card/passport number":"เลขที่บัตรประชาชน / พาสปอร์ต",
|
||||
"Back of card number":"เลขหลังบัตร",
|
||||
"Title":"คำนำหน้าชื่อ",
|
||||
"Mr.":"นาย",
|
||||
"Mrs.":"นาง",
|
||||
"Miss":"นางสาว",
|
||||
"Not specified":"ไม่ระบุ",
|
||||
"Thai name/english name in passport":"ชื่อภาษาไทย",
|
||||
"English name":"ชื่อภาษาอังกฤษ",
|
||||
"nationality":"สัญชาติ",
|
||||
"Date of birth":"วันเดือนปีเกิด",
|
||||
"Mobilephone number":"เบอร์โทรศัพท์",
|
||||
"Address as per ID card":"ที่อยู่ตามบัตรประชาชน",
|
||||
"Current address":"ที่อยู่ปัจจุบัน",
|
||||
"profession":"อาชีพ",
|
||||
"Name of workplace":"ชื่อสถานที่ทำงาน",
|
||||
"Work address":"ที่อยู่ที่ทำงาน",
|
||||
"Purpose of using the service":"วัตถุประสงค์ในการใช้บริการ",
|
||||
"Pay for products and services":"ชำระค่าสินค้าและบริการ",
|
||||
"Accepting payment for products and services":"รับชำระค่าสินค้าและบริการ",
|
||||
"Both Payment and Acceping payment":"ทั้งรับชำระ และชำระ",
|
||||
"Spend at participating merchants":"ใช้จ่ายร้านค้าที่ร่วมโปรโมชั่น",
|
||||
"Please enter the OTP code.":"กรุณากรอกรหัส OTP",
|
||||
"The code will be sent to":"รหัสจะส่งไปยังเบอร์",
|
||||
"within the specified time":"ภายในเวลาที่กำหนด",
|
||||
"Please fill in":"กรุณากรอก ",
|
||||
"Accept the Privacy Policy":"ยอมรับใน Privacy Policy",
|
||||
"accept":"ยอมรับ",
|
||||
"Take your photo with your ID card / passport":"ยอมรับ",
|
||||
"Sign your name":"ลงลายมือชื่อ",
|
||||
"Your Name":"ชื่อ",
|
||||
"Member ID":"เลขบัตรสมาชิก",
|
||||
"Balance":"ยอดเงินคงเหลือ",
|
||||
"Point":"คะแนนของคุณ",
|
||||
"Wallet Topup":"เติมเงิน",
|
||||
"Pay":"จ่ายเงิน",
|
||||
"Receive Money":"รับเงิน",
|
||||
"Transfer Money":"โอนเงิน",
|
||||
"Promotions for you":"โปรโมชั่นแนะนำสำหรับคุณ",
|
||||
"Baht":"บาท",
|
||||
"Create Transaction":"ทำรายการ",
|
||||
"Create QR for Topup":"สร้าง QR สำหรับเติมเงิน",
|
||||
"Create QR code to specify the amount":"สร้าง QR ระบุจำนวนเงิน",
|
||||
"Create QR code":"สร้าง QR",
|
||||
"Transaction History":"ประวัติ",
|
||||
"Scan QR code to pay via mobile app":"สแกนคิวอาร์โค้ดเพื่อจ่ายเงินผ่าน mobile app",
|
||||
"Show QR Code to get paid":"แสดง QR Code เพื่อรับเงิน",
|
||||
"Specify the amount":"ระบุจำนวนเงิน",
|
||||
"Save QR":"บันทึก QR",
|
||||
"PromptPay":"พร้อมเพย์",
|
||||
"Transfer money via PromptPay":"โอนเงินผ่านพร้อมเพย์",
|
||||
"Enter the recipient's phone number":"ใส่เบอร์โทรศัพท์ผู้รับ",
|
||||
"Amount transferred":"จำนวนเงินที่โอน",
|
||||
"Scan via QR code":"สแกนผ่าน QR code",
|
||||
"ประเภทของงาน":"ประเภทของงาน",
|
||||
"อาชีพในภาครัฐ":"อาชีพในภาครัฐ",
|
||||
"อาชีพในธุรกิจอื่นๆ":"อาชีพในธุรกิจอื่นๆ",
|
||||
"อาชีพด้านศิลปะ ความบันเทิงและกีฬา":"อาชีพด้านศิลปะ ความบันเทิงและกีฬา",
|
||||
"ตำแหน่งผู้บริหารหรือเจ้าของธุรกิจ":"ตำแหน่งผู้บริหารหรือเจ้าของธุรกิจ",
|
||||
"ผู้พิพากษา/อัยการ":"ผู้พิพากษา/อัยการ",
|
||||
"ตำรวจ/ทหาร":"ตำรวจ/ทหาร",
|
||||
"นักการเมือง":"นักการเมือง",
|
||||
"นักการเมืองท้องถิ่น":"นักการเมืองท้องถิ่น",
|
||||
"นักเรียน/นักศึกษา":"นักเรียน/นักศึกษา",
|
||||
"พนักงานบริษัท":"พนักงานบริษัท",
|
||||
"พนักงานรัฐวิสาหกิจ":"พนักงานรัฐวิสาหกิจ",
|
||||
"รับจ้างทั่วไป":"รับจ้างทั่วไป",
|
||||
"อาชีพอิสระ":"อาชีพอิสระ",
|
||||
"บริษัทจัดหางานสำหรับแรงงานต่างชาติ":"บริษัทจัดหางานสำหรับแรงงานต่างชาติ",
|
||||
"ผู้ค้าของเก่า":"ผู้ค้าของเก่า",
|
||||
"ผู้ค้าอัญมณี/ผู้ค้าทอง":"ผู้ค้าอัญมณี/ผู้ค้าทอง",
|
||||
"ผู้ค้าอาวุธและกระสุนปืน":"ผู้ค้าอาวุธและกระสุนปืน",
|
||||
"ผู้ผลิตอาวุธและกระสุนปืน":"ผู้ผลิตอาวุธและกระสุนปืน",
|
||||
"ธุรกิจคาสิโน/บ่อนการพนัน":"ธุรกิจคาสิโน/บ่อนการพนัน",
|
||||
"อาชีพอื่นๆ":"อาชีพอื่นๆ",
|
||||
"ศิลปิน":"ศิลปิน",
|
||||
"บุคลากรในวงการบันเทิง":"บุคลากรในวงการบันเทิง",
|
||||
"อินฟลูเอ็นเซอร์/นักรีวิว":"อินฟลูเอ็นเซอร์/นักรีวิว",
|
||||
"สถานบันเทิง":"สถานบันเทิง",
|
||||
"นักกีฬา":"นักกีฬา",
|
||||
"เจ้าของกิจการ":"เจ้าของกิจการ",
|
||||
"เจ้าของสำนักงานกฏหมาย":"เจ้าของสำนักงานกฏหมาย",
|
||||
"ผู้บริหาร/ผู้อำนวยการ":"ผู้บริหาร/ผู้อำนวยการ",
|
||||
"บัตรประชาชน":"บัตรประชาชน",
|
||||
"พาสปอร์ต":"พาสปอร์ต",
|
||||
"Password ต้องมีตัวเลขและตัวอักษรภาษาอังกฤษอย่างน้อย 1 ตัว":"Password ต้องมีตัวเลขและตัวอักษรภาษาอังกฤษอย่างน้อย 1 ตัว",
|
||||
"Password ต้องมากกว่า 6 ตัว":"Password ต้องมากกว่า 6 ตัว",
|
||||
"Password ไม่ตรงกัน":"Password ไม่ตรงกัน",
|
||||
"บัตรประชาชนไม่ถูกต้อง":"บัตรประชาชนไม่ถูกต้อง",
|
||||
"เบอร์มือถือไม่ถูกต้อง":"เบอร์มือถือไม่ถูกต้อง",
|
||||
"Email ไม่ถูกต้อง":"Email ไม่ถูกต้อง",
|
||||
"หน้าหลัก":"หน้าหลัก",
|
||||
"สแกน":"สแกน",
|
||||
"ทั้งหมด":"ทั้งหมด",
|
||||
"สแกน QR Code NEO PAY":"สแกน QR Code NEO PAY",
|
||||
"สแกน Thai QR Code":"สแกน Thai QR Code",
|
||||
"แอปพลิเคชันทั้งหมด":"แอปพลิเคชันทั้งหมด",
|
||||
"สมาชิก NEO PAY":"สมาชิก NEO PAY",
|
||||
"บัญชีธนาคาร":"บัญชีธนาคาร",
|
||||
"โอนเงินให้สมาชิก NEO PAY":"โอนเงินให้สมาชิก NEO PAY",
|
||||
"เบอร์โทรศัพท์ผู้รับ":"เบอร์โทรศัพท์ผู้รับ",
|
||||
"ชื่อ":"ชื่อ",
|
||||
"เบอร์โทรศัพท์":"เบอร์โทรศัพท์",
|
||||
"จำนวนเงินที่โอน / จ่าย":"จำนวนเงินที่โอน / จ่าย",
|
||||
"ใช้แต้ม NEO PAY แทนเงินสด":"ใช้แต้ม NEO PAY แทนเงินสด",
|
||||
"คะแนนของคุณ":"คะแนนของคุณ",
|
||||
"แต้ม":"แต้ม",
|
||||
"ยอดเงินทั้งหมด":"ยอดเงินทั้งหมด",
|
||||
"1 แต้ม = 10 สตางค์":"1 แต้ม = 10 สตางค์",
|
||||
"กลับสู่หน้าหลัก":"กลับสู่หน้าหลัก",
|
||||
"ยกเลิก":"ยกเลิก",
|
||||
"ชื่อบัญชี":"ชื่อบัญชี" ,
|
||||
"จำนวนเงิน":"จำนวนเงิน",
|
||||
"หมายเลขสมาชิก":"หมายเลขสมาชิก",
|
||||
"QR ของคุณได้ถูกสร้างแล้ว\nผู้จ่ายสามารถสแกนเพื่อเติมเงินได้": "QR ของคุณได้ถูกสร้างแล้ว\nผู้จ่ายสามารถสแกนเพื่อเติมเงินได้"
|
||||
}
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 702 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 267 B |
|
After Width: | Height: | Size: 516 B |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 235 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,24 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTER_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTER_H_
|
||||
|
||||
#import "FlutterAppDelegate.h"
|
||||
#import "FlutterBinaryMessenger.h"
|
||||
#import "FlutterCallbackCache.h"
|
||||
#import "FlutterChannels.h"
|
||||
#import "FlutterCodecs.h"
|
||||
#import "FlutterDartProject.h"
|
||||
#import "FlutterEngine.h"
|
||||
#import "FlutterEngineGroup.h"
|
||||
#import "FlutterHeadlessDartRunner.h"
|
||||
#import "FlutterMacros.h"
|
||||
#import "FlutterPlatformViews.h"
|
||||
#import "FlutterPlugin.h"
|
||||
#import "FlutterPluginAppLifeCycleDelegate.h"
|
||||
#import "FlutterTexture.h"
|
||||
#import "FlutterViewController.h"
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTER_H_
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERAPPDELEGATE_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERAPPDELEGATE_H_
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "FlutterMacros.h"
|
||||
#import "FlutterPlugin.h"
|
||||
|
||||
/**
|
||||
* `UIApplicationDelegate` subclass for simple apps that want default behavior.
|
||||
*
|
||||
* This class implements the following behaviors:
|
||||
* * Status bar touches are forwarded to the key window's root view
|
||||
* `FlutterViewController`, in order to trigger scroll to top.
|
||||
* * Keeps the Flutter connection open in debug mode when the phone screen
|
||||
* locks.
|
||||
*
|
||||
* App delegates for Flutter applications are *not* required to inherit from
|
||||
* this class. Developers of custom app delegate classes should copy and paste
|
||||
* code as necessary from FlutterAppDelegate.mm.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterAppDelegate
|
||||
: UIResponder <UIApplicationDelegate, FlutterPluginRegistry, FlutterAppLifeCycleProvider>
|
||||
|
||||
@property(strong, nonatomic) UIWindow* window;
|
||||
|
||||
@end
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERAPPDELEGATE_H_
|
||||
@@ -0,0 +1,106 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERBINARYMESSENGER_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERBINARYMESSENGER_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FlutterMacros.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
* A message reply callback.
|
||||
*
|
||||
* Used for submitting a binary reply back to a Flutter message sender. Also used
|
||||
* in for handling a binary message reply received from Flutter.
|
||||
*
|
||||
* @param reply The reply.
|
||||
*/
|
||||
typedef void (^FlutterBinaryReply)(NSData* _Nullable reply);
|
||||
|
||||
/**
|
||||
* A strategy for handling incoming binary messages from Flutter and to send
|
||||
* asynchronous replies back to Flutter.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param reply A callback for submitting an asynchronous reply to the sender.
|
||||
*/
|
||||
typedef void (^FlutterBinaryMessageHandler)(NSData* _Nullable message, FlutterBinaryReply reply);
|
||||
|
||||
typedef int64_t FlutterBinaryMessengerConnection;
|
||||
|
||||
@protocol FlutterTaskQueue <NSObject>
|
||||
@end
|
||||
|
||||
/**
|
||||
* A facility for communicating with the Flutter side using asynchronous message
|
||||
* passing with binary messages.
|
||||
*
|
||||
* Implementated by:
|
||||
* - `FlutterBasicMessageChannel`, which supports communication using structured
|
||||
* messages.
|
||||
* - `FlutterMethodChannel`, which supports communication using asynchronous
|
||||
* method calls.
|
||||
* - `FlutterEventChannel`, which supports commuication using event streams.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@protocol FlutterBinaryMessenger <NSObject>
|
||||
/// TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.
|
||||
@optional
|
||||
- (NSObject<FlutterTaskQueue>*)makeBackgroundTaskQueue;
|
||||
|
||||
- (FlutterBinaryMessengerConnection)
|
||||
setMessageHandlerOnChannel:(NSString*)channel
|
||||
binaryMessageHandler:(FlutterBinaryMessageHandler _Nullable)handler
|
||||
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
|
||||
|
||||
@required
|
||||
/**
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* no reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel message:(NSData* _Nullable)message;
|
||||
|
||||
/**
|
||||
* Sends a binary message to the Flutter side on the specified channel, expecting
|
||||
* an asynchronous reply.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param message The message.
|
||||
* @param callback A callback for receiving a reply.
|
||||
*/
|
||||
- (void)sendOnChannel:(NSString*)channel
|
||||
message:(NSData* _Nullable)message
|
||||
binaryReply:(FlutterBinaryReply _Nullable)callback;
|
||||
|
||||
/**
|
||||
* Registers a message handler for incoming binary messages from the Flutter side
|
||||
* on the specified channel.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param channel The channel name.
|
||||
* @param handler The message handler.
|
||||
* @return An identifier that represents the connection that was just created to the channel.
|
||||
*/
|
||||
- (FlutterBinaryMessengerConnection)setMessageHandlerOnChannel:(NSString*)channel
|
||||
binaryMessageHandler:
|
||||
(FlutterBinaryMessageHandler _Nullable)handler;
|
||||
|
||||
/**
|
||||
* Clears out a channel's message handler if that handler is still the one that
|
||||
* was created as a result of
|
||||
* `setMessageHandlerOnChannel:binaryMessageHandler:`.
|
||||
*
|
||||
* @param connection The result from `setMessageHandlerOnChannel:binaryMessageHandler:`.
|
||||
*/
|
||||
- (void)cleanUpConnection:(FlutterBinaryMessengerConnection)connection;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERBINARYMESSENGER_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERCALLBACKCACHE_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERCALLBACKCACHE_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FlutterMacros.h"
|
||||
|
||||
/**
|
||||
* An object containing the result of `FlutterCallbackCache`'s `lookupCallbackInformation`
|
||||
* method.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterCallbackInformation : NSObject
|
||||
/**
|
||||
* The name of the callback.
|
||||
*/
|
||||
@property(copy) NSString* callbackName;
|
||||
/**
|
||||
* The class name of the callback.
|
||||
*/
|
||||
@property(copy) NSString* callbackClassName;
|
||||
/**
|
||||
* The library path of the callback.
|
||||
*/
|
||||
@property(copy) NSString* callbackLibraryPath;
|
||||
@end
|
||||
|
||||
/**
|
||||
* The cache containing callback information for spawning a
|
||||
* `FlutterHeadlessDartRunner`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterCallbackCache : NSObject
|
||||
/**
|
||||
* Returns the callback information for the given callback handle.
|
||||
* This callback information can be used when spawning a
|
||||
* `FlutterHeadlessDartRunner`.
|
||||
*
|
||||
* @param handle The handle for a callback, provided by the
|
||||
* Dart method `PluginUtilities.getCallbackHandle`.
|
||||
* @return A `FlutterCallbackInformation` object which contains the name of the
|
||||
* callback, the name of the class in which the callback is defined, and the
|
||||
* path of the library which contains the callback. If the provided handle is
|
||||
* invalid, nil is returned.
|
||||
*/
|
||||
+ (FlutterCallbackInformation*)lookupCallbackInformation:(int64_t)handle;
|
||||
|
||||
@end
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERCALLBACKCACHE_H_
|
||||
@@ -0,0 +1,487 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCHANNELS_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCHANNELS_H_
|
||||
|
||||
#import "FlutterBinaryMessenger.h"
|
||||
#import "FlutterCodecs.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
* A message reply callback.
|
||||
*
|
||||
* Used for submitting a reply back to a Flutter message sender. Also used in
|
||||
* the dual capacity for handling a message reply received from Flutter.
|
||||
*
|
||||
* @param reply The reply.
|
||||
*/
|
||||
typedef void (^FlutterReply)(id _Nullable reply);
|
||||
|
||||
/**
|
||||
* A strategy for handling incoming messages from Flutter and to send
|
||||
* asynchronous replies back to Flutter.
|
||||
*
|
||||
* @param message The message.
|
||||
* @param callback A callback for submitting a reply to the sender which can be invoked from any
|
||||
* thread.
|
||||
*/
|
||||
typedef void (^FlutterMessageHandler)(id _Nullable message, FlutterReply callback);
|
||||
|
||||
/**
|
||||
* A channel for communicating with the Flutter side using basic, asynchronous
|
||||
* message passing.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterBasicMessageChannel : NSObject
|
||||
/**
|
||||
* Creates a `FlutterBasicMessageChannel` with the specified name and binary
|
||||
* messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMessageCodec` to encode and decode messages.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)messageChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
* messenger, and message codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The message codec.
|
||||
*/
|
||||
+ (instancetype)messageChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMessageCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
* messenger, and message codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The message codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMessageCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterBasicMessageChannel` with the specified name, binary
|
||||
* messenger, and message codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The message codec.
|
||||
* @param taskQueue The FlutterTaskQueue that executes the handler (see
|
||||
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMessageCodec>*)codec
|
||||
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
|
||||
|
||||
/**
|
||||
* Sends the specified message to the Flutter side, ignoring any reply.
|
||||
*
|
||||
* @param message The message. Must be supported by the codec of this
|
||||
* channel.
|
||||
*/
|
||||
- (void)sendMessage:(id _Nullable)message;
|
||||
|
||||
/**
|
||||
* Sends the specified message to the Flutter side, expecting an asynchronous
|
||||
* reply.
|
||||
*
|
||||
* @param message The message. Must be supported by the codec of this channel.
|
||||
* @param callback A callback to be invoked with the message reply from Flutter.
|
||||
*/
|
||||
- (void)sendMessage:(id _Nullable)message reply:(FlutterReply _Nullable)callback;
|
||||
|
||||
/**
|
||||
* Registers a message handler with this channel.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The message handler.
|
||||
*/
|
||||
- (void)setMessageHandler:(FlutterMessageHandler _Nullable)handler;
|
||||
|
||||
/**
|
||||
* Adjusts the number of messages that will get buffered when sending messages to
|
||||
* channels that aren't fully set up yet. For example, the engine isn't running
|
||||
* yet or the channel's message handler isn't set up on the Dart side yet.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param newSize The number of messages that will get buffered.
|
||||
*/
|
||||
+ (void)resizeChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
size:(NSInteger)newSize;
|
||||
|
||||
/**
|
||||
* Adjusts the number of messages that will get buffered when sending messages to
|
||||
* channels that aren't fully set up yet. For example, the engine isn't running
|
||||
* yet or the channel's message handler isn't set up on the Dart side yet.
|
||||
*
|
||||
* @param newSize The number of messages that will get buffered.
|
||||
*/
|
||||
- (void)resizeChannelBuffer:(NSInteger)newSize;
|
||||
|
||||
/**
|
||||
* Defines whether the channel should show warning messages when discarding messages
|
||||
* due to overflow.
|
||||
*
|
||||
* @param warns When false, the channel is expected to overflow and warning messages
|
||||
* will not be shown.
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (void)setWarnsOnOverflow:(BOOL)warns
|
||||
forChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
* Defines whether the channel should show warning messages when discarding messages
|
||||
* due to overflow.
|
||||
*
|
||||
* @param warns When false, the channel is expected to overflow and warning messages
|
||||
* will not be shown.
|
||||
*/
|
||||
- (void)setWarnsOnOverflow:(BOOL)warns;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* A method call result callback.
|
||||
*
|
||||
* Used for submitting a method call result back to a Flutter caller. Also used in
|
||||
* the dual capacity for handling a method call result received from Flutter.
|
||||
*
|
||||
* @param result The result.
|
||||
*/
|
||||
typedef void (^FlutterResult)(id _Nullable result);
|
||||
|
||||
/**
|
||||
* A strategy for handling method calls.
|
||||
*
|
||||
* @param call The incoming method call.
|
||||
* @param result A callback to asynchronously submit the result of the call.
|
||||
* Invoke the callback with a `FlutterError` to indicate that the call failed.
|
||||
* Invoke the callback with `FlutterMethodNotImplemented` to indicate that the
|
||||
* method was unknown. Any other values, including `nil`, are interpreted as
|
||||
* successful results. This can be invoked from any thread.
|
||||
*/
|
||||
typedef void (^FlutterMethodCallHandler)(FlutterMethodCall* call, FlutterResult result);
|
||||
|
||||
/**
|
||||
* A constant used with `FlutterMethodCallHandler` to respond to the call of an
|
||||
* unknown method.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
extern NSObject const* FlutterMethodNotImplemented;
|
||||
|
||||
/**
|
||||
* A channel for communicating with the Flutter side using invocation of
|
||||
* asynchronous methods.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterMethodChannel : NSObject
|
||||
/**
|
||||
* Creates a `FlutterMethodChannel` with the specified name and binary messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMethodCodec` to encode and decode method calls
|
||||
* and result envelopes.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)methodChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterMethodChannel` with the specified name, binary messenger, and
|
||||
* method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
+ (instancetype)methodChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterMethodChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterMethodChannel` with the specified name, binary messenger,
|
||||
* method codec, and task queue.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
* @param taskQueue The FlutterTaskQueue that executes the handler (see
|
||||
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec
|
||||
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* Invokes the specified Flutter method with the specified arguments, expecting
|
||||
* no results.
|
||||
*
|
||||
* @see [MethodChannel.setMethodCallHandler](https://api.flutter.dev/flutter/services/MethodChannel/setMethodCallHandler.html)
|
||||
*
|
||||
* @param method The name of the method to invoke.
|
||||
* @param arguments The arguments. Must be a value supported by the codec of this
|
||||
* channel.
|
||||
*/
|
||||
// clang-format on
|
||||
- (void)invokeMethod:(NSString*)method arguments:(id _Nullable)arguments;
|
||||
|
||||
/**
|
||||
* Invokes the specified Flutter method with the specified arguments, expecting
|
||||
* an asynchronous result.
|
||||
*
|
||||
* @param method The name of the method to invoke.
|
||||
* @param arguments The arguments. Must be a value supported by the codec of this
|
||||
* channel.
|
||||
* @param callback A callback that will be invoked with the asynchronous result.
|
||||
* The result will be a `FlutterError` instance, if the method call resulted
|
||||
* in an error on the Flutter side. Will be `FlutterMethodNotImplemented`, if
|
||||
* the method called was not implemented on the Flutter side. Any other value,
|
||||
* including `nil`, should be interpreted as successful results.
|
||||
*/
|
||||
- (void)invokeMethod:(NSString*)method
|
||||
arguments:(id _Nullable)arguments
|
||||
result:(FlutterResult _Nullable)callback;
|
||||
/**
|
||||
* Registers a handler for method calls from the Flutter side.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The method call handler.
|
||||
*/
|
||||
- (void)setMethodCallHandler:(FlutterMethodCallHandler _Nullable)handler;
|
||||
|
||||
/**
|
||||
* Adjusts the number of messages that will get buffered when sending messages to
|
||||
* channels that aren't fully set up yet. For example, the engine isn't running
|
||||
* yet or the channel's message handler isn't set up on the Dart side yet.
|
||||
*/
|
||||
- (void)resizeChannelBuffer:(NSInteger)newSize;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* An event sink callback.
|
||||
*
|
||||
* @param event The event.
|
||||
*/
|
||||
typedef void (^FlutterEventSink)(id _Nullable event);
|
||||
|
||||
/**
|
||||
* A strategy for exposing an event stream to the Flutter side.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@protocol FlutterStreamHandler
|
||||
/**
|
||||
* Sets up an event stream and begin emitting events.
|
||||
*
|
||||
* Invoked when the first listener is registered with the Stream associated to
|
||||
* this channel on the Flutter side.
|
||||
*
|
||||
* @param arguments Arguments for the stream.
|
||||
* @param events A callback to asynchronously emit events. Invoke the
|
||||
* callback with a `FlutterError` to emit an error event. Invoke the
|
||||
* callback with `FlutterEndOfEventStream` to indicate that no more
|
||||
* events will be emitted. Any other value, including `nil` are emitted as
|
||||
* successful events.
|
||||
* @return A FlutterError instance, if setup fails.
|
||||
*/
|
||||
- (FlutterError* _Nullable)onListenWithArguments:(id _Nullable)arguments
|
||||
eventSink:(FlutterEventSink)events;
|
||||
|
||||
/**
|
||||
* Tears down an event stream.
|
||||
*
|
||||
* Invoked when the last listener is deregistered from the Stream associated to
|
||||
* this channel on the Flutter side.
|
||||
*
|
||||
* The channel implementation may call this method with `nil` arguments
|
||||
* to separate a pair of two consecutive set up requests. Such request pairs
|
||||
* may occur during Flutter hot restart.
|
||||
*
|
||||
* @param arguments Arguments for the stream.
|
||||
* @return A FlutterError instance, if teardown fails.
|
||||
*/
|
||||
- (FlutterError* _Nullable)onCancelWithArguments:(id _Nullable)arguments;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A constant used with `FlutterEventChannel` to indicate end of stream.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
extern NSObject const* FlutterEndOfEventStream;
|
||||
|
||||
/**
|
||||
* A channel for communicating with the Flutter side using event streams.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterEventChannel : NSObject
|
||||
/**
|
||||
* Creates a `FlutterEventChannel` with the specified name and binary messenger.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
*
|
||||
* The channel uses `FlutterStandardMethodCodec` to decode stream setup and
|
||||
* teardown requests, and to encode event envelopes.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
*/
|
||||
+ (instancetype)eventChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
+ (instancetype)eventChannelWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
* and method codec.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec;
|
||||
|
||||
/**
|
||||
* Initializes a `FlutterEventChannel` with the specified name, binary messenger,
|
||||
* method codec and task queue.
|
||||
*
|
||||
* The channel name logically identifies the channel; identically named channels
|
||||
* interfere with each other's communication.
|
||||
*
|
||||
* The binary messenger is a facility for sending raw, binary messages to the
|
||||
* Flutter side. This protocol is implemented by `FlutterEngine` and `FlutterViewController`.
|
||||
*
|
||||
* @param name The channel name.
|
||||
* @param messenger The binary messenger.
|
||||
* @param codec The method codec.
|
||||
* @param taskQueue The FlutterTaskQueue that executes the handler (see
|
||||
-[FlutterBinaryMessenger makeBackgroundTaskQueue]).
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||
codec:(NSObject<FlutterMethodCodec>*)codec
|
||||
taskQueue:(NSObject<FlutterTaskQueue>* _Nullable)taskQueue;
|
||||
/**
|
||||
* Registers a handler for stream setup requests from the Flutter side.
|
||||
*
|
||||
* Replaces any existing handler. Use a `nil` handler for unregistering the
|
||||
* existing handler.
|
||||
*
|
||||
* @param handler The stream handler.
|
||||
*/
|
||||
- (void)setStreamHandler:(NSObject<FlutterStreamHandler>* _Nullable)handler;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCHANNELS_H_
|
||||
@@ -0,0 +1,478 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FlutterMacros.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* A message encoding/decoding mechanism.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@protocol FlutterMessageCodec
|
||||
/**
|
||||
* Returns a shared instance of this `FlutterMessageCodec`.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Encodes the specified message into binary.
|
||||
*
|
||||
* @param message The message.
|
||||
* @return The binary encoding, or `nil`, if `message` was `nil`.
|
||||
*/
|
||||
- (NSData* _Nullable)encode:(id _Nullable)message;
|
||||
|
||||
/**
|
||||
* Decodes the specified message from binary.
|
||||
*
|
||||
* @param message The message.
|
||||
* @return The decoded message, or `nil`, if `message` was `nil`.
|
||||
*/
|
||||
- (id _Nullable)decode:(NSData* _Nullable)message;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMessageCodec` using unencoded binary messages, represented as
|
||||
* `NSData` instances.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [BinaryCodec](https://api.flutter.dev/flutter/services/BinaryCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* On the Dart side, messages are represented using `ByteData`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterBinaryCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMessageCodec` using UTF-8 encoded `NSString` messages.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StringCodec](https://api.flutter.dev/flutter/services/StringCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStringCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMessageCodec` using UTF-8 encoded JSON messages.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [JSONMessageCodec](https://api.flutter.dev/flutter/services/JSONMessageCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Supports values accepted by `NSJSONSerialization` plus top-level
|
||||
* `nil`, `NSNumber`, and `NSString`.
|
||||
*
|
||||
* On the Dart side, JSON messages are handled by the JSON facilities of the
|
||||
* [`dart:convert`](https://api.dartlang.org/stable/dart-convert/JSON-constant.html)
|
||||
* package.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterJSONMessageCodec : NSObject <FlutterMessageCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
* A writer of the Flutter standard binary encoding.
|
||||
*
|
||||
* See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
*
|
||||
* The encoding is extensible via subclasses overriding `writeValue`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardWriter : NSObject
|
||||
/**
|
||||
* Create a `FlutterStandardWriter` who will write to \p data.
|
||||
*/
|
||||
- (instancetype)initWithData:(NSMutableData*)data;
|
||||
/** Write a 8-bit byte. */
|
||||
- (void)writeByte:(UInt8)value;
|
||||
/** Write an array of \p bytes of size \p length. */
|
||||
- (void)writeBytes:(const void*)bytes length:(NSUInteger)length;
|
||||
/** Write an array of bytes contained in \p data. */
|
||||
- (void)writeData:(NSData*)data;
|
||||
/** Write 32-bit unsigned integer that represents a \p size of a collection. */
|
||||
- (void)writeSize:(UInt32)size;
|
||||
/** Write zero padding until data is aligned with \p alignment. */
|
||||
- (void)writeAlignment:(UInt8)alignment;
|
||||
/** Write a string with UTF-8 encoding. */
|
||||
- (void)writeUTF8:(NSString*)value;
|
||||
/** Introspects into an object and writes its representation.
|
||||
*
|
||||
* Supported Data Types:
|
||||
* - NSNull
|
||||
* - NSNumber
|
||||
* - NSString (as UTF-8)
|
||||
* - FlutterStandardTypedData
|
||||
* - NSArray of supported types
|
||||
* - NSDictionary of supporte types
|
||||
*
|
||||
* NSAsserts on failure.
|
||||
*/
|
||||
- (void)writeValue:(id)value;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A reader of the Flutter standard binary encoding.
|
||||
*
|
||||
* See `FlutterStandardMessageCodec` for details on the encoding.
|
||||
*
|
||||
* The encoding is extensible via subclasses overriding `readValueOfType`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardReader : NSObject
|
||||
/**
|
||||
* Create a new `FlutterStandardReader` who reads from \p data.
|
||||
*/
|
||||
- (instancetype)initWithData:(NSData*)data;
|
||||
/** Returns YES when the reader hasn't reached the end of its data. */
|
||||
- (BOOL)hasMore;
|
||||
/** Reads a byte value and increments the position. */
|
||||
- (UInt8)readByte;
|
||||
/** Reads a sequence of byte values of \p length and increments the position. */
|
||||
- (void)readBytes:(void*)destination length:(NSUInteger)length;
|
||||
/** Reads a sequence of byte values of \p length and increments the position. */
|
||||
- (NSData*)readData:(NSUInteger)length;
|
||||
/** Reads a 32-bit unsigned integer representing a collection size and increments the position.*/
|
||||
- (UInt32)readSize;
|
||||
/** Advances the read position until it is aligned with \p alignment. */
|
||||
- (void)readAlignment:(UInt8)alignment;
|
||||
/** Read a null terminated string encoded with UTF-8/ */
|
||||
- (NSString*)readUTF8;
|
||||
/**
|
||||
* Reads a byte for `FlutterStandardField` the decodes a value matching that type.
|
||||
*
|
||||
* See also: -[FlutterStandardWriter writeValue]
|
||||
*/
|
||||
- (nullable id)readValue;
|
||||
/**
|
||||
* Decodes a value matching the \p type specified.
|
||||
*
|
||||
* See also:
|
||||
* - `FlutterStandardField`
|
||||
* - `-[FlutterStandardWriter writeValue]`
|
||||
*/
|
||||
- (nullable id)readValueOfType:(UInt8)type;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A factory of compatible reader/writer instances using the Flutter standard
|
||||
* binary encoding or extensions thereof.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardReaderWriter : NSObject
|
||||
/**
|
||||
* Create a new `FlutterStandardWriter` for writing to \p data.
|
||||
*/
|
||||
- (FlutterStandardWriter*)writerWithData:(NSMutableData*)data;
|
||||
/**
|
||||
* Create a new `FlutterStandardReader` for reading from \p data.
|
||||
*/
|
||||
- (FlutterStandardReader*)readerWithData:(NSData*)data;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMessageCodec` using the Flutter standard binary encoding.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StandardMessageCodec](https://api.flutter.dev/flutter/services/StandardMessageCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Supported messages are acyclic values of these forms:
|
||||
*
|
||||
* - `nil` or `NSNull`
|
||||
* - `NSNumber` (including their representation of Boolean values)
|
||||
* - `NSString`
|
||||
* - `FlutterStandardTypedData`
|
||||
* - `NSArray` of supported values
|
||||
* - `NSDictionary` with supported keys and values
|
||||
*
|
||||
* On the Dart side, these values are represented as follows:
|
||||
*
|
||||
* - `nil` or `NSNull`: null
|
||||
* - `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
|
||||
* - `NSString`: `String`
|
||||
* - `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
|
||||
* - `NSArray`: `List`
|
||||
* - `NSDictionary`: `Map`
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardMessageCodec : NSObject <FlutterMessageCodec>
|
||||
/**
|
||||
* Create a `FlutterStandardMessageCodec` who will read and write to \p readerWriter.
|
||||
*/
|
||||
+ (instancetype)codecWithReaderWriter:(FlutterStandardReaderWriter*)readerWriter;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Command object representing a method call on a `FlutterMethodChannel`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterMethodCall : NSObject
|
||||
/**
|
||||
* Creates a method call for invoking the specified named method with the
|
||||
* specified arguments.
|
||||
*
|
||||
* @param method the name of the method to call.
|
||||
* @param arguments the arguments value.
|
||||
*/
|
||||
+ (instancetype)methodCallWithMethodName:(NSString*)method arguments:(id _Nullable)arguments;
|
||||
|
||||
/**
|
||||
* The method name.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSString* method;
|
||||
|
||||
/**
|
||||
* The arguments.
|
||||
*/
|
||||
@property(readonly, nonatomic, nullable) id arguments;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Error object representing an unsuccessful outcome of invoking a method
|
||||
* on a `FlutterMethodChannel`, or an error event on a `FlutterEventChannel`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterError : NSObject
|
||||
/**
|
||||
* Creates a `FlutterError` with the specified error code, message, and details.
|
||||
*
|
||||
* @param code An error code string for programmatic use.
|
||||
* @param message A human-readable error message.
|
||||
* @param details Custom error details.
|
||||
*/
|
||||
+ (instancetype)errorWithCode:(NSString*)code
|
||||
message:(NSString* _Nullable)message
|
||||
details:(id _Nullable)details;
|
||||
/**
|
||||
The error code.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSString* code;
|
||||
|
||||
/**
|
||||
The error message.
|
||||
*/
|
||||
@property(readonly, nonatomic, nullable) NSString* message;
|
||||
|
||||
/**
|
||||
The error details.
|
||||
*/
|
||||
@property(readonly, nonatomic, nullable) id details;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Type of numeric data items encoded in a `FlutterStandardDataType`.
|
||||
*
|
||||
* - FlutterStandardDataTypeUInt8: plain bytes
|
||||
* - FlutterStandardDataTypeInt32: 32-bit signed integers
|
||||
* - FlutterStandardDataTypeInt64: 64-bit signed integers
|
||||
* - FlutterStandardDataTypeFloat64: 64-bit floats
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, FlutterStandardDataType) {
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
FlutterStandardDataTypeUInt8,
|
||||
FlutterStandardDataTypeInt32,
|
||||
FlutterStandardDataTypeInt64,
|
||||
FlutterStandardDataTypeFloat32,
|
||||
FlutterStandardDataTypeFloat64,
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
};
|
||||
|
||||
/**
|
||||
* A byte buffer holding `UInt8`, `SInt32`, `SInt64`, or `Float64` values, used
|
||||
* with `FlutterStandardMessageCodec` and `FlutterStandardMethodCodec`.
|
||||
*
|
||||
* Two's complement encoding is used for signed integers. IEEE754
|
||||
* double-precision representation is used for floats. The platform's native
|
||||
* endianness is assumed.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardTypedData : NSObject
|
||||
/**
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as plain bytes.
|
||||
*
|
||||
* @param data the byte data.
|
||||
*/
|
||||
+ (instancetype)typedDataWithBytes:(NSData*)data;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 32-bit signed integers.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 4.
|
||||
*/
|
||||
+ (instancetype)typedDataWithInt32:(NSData*)data;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 64-bit signed integers.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 8.
|
||||
*/
|
||||
+ (instancetype)typedDataWithInt64:(NSData*)data;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 32-bit floats.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 8.
|
||||
*/
|
||||
+ (instancetype)typedDataWithFloat32:(NSData*)data;
|
||||
|
||||
/**
|
||||
* Creates a `FlutterStandardTypedData` which interprets the specified data
|
||||
* as 64-bit floats.
|
||||
*
|
||||
* @param data the byte data. The length must be divisible by 8.
|
||||
*/
|
||||
+ (instancetype)typedDataWithFloat64:(NSData*)data;
|
||||
|
||||
/**
|
||||
* The raw underlying data buffer.
|
||||
*/
|
||||
@property(readonly, nonatomic) NSData* data;
|
||||
|
||||
/**
|
||||
* The type of the encoded values.
|
||||
*/
|
||||
@property(readonly, nonatomic, assign) FlutterStandardDataType type;
|
||||
|
||||
/**
|
||||
* The number of value items encoded.
|
||||
*/
|
||||
@property(readonly, nonatomic, assign) UInt32 elementCount;
|
||||
|
||||
/**
|
||||
* The number of bytes used by the encoding of a single value item.
|
||||
*/
|
||||
@property(readonly, nonatomic, assign) UInt8 elementSize;
|
||||
@end
|
||||
|
||||
/**
|
||||
* An arbitrarily large integer value, used with `FlutterStandardMessageCodec`
|
||||
* and `FlutterStandardMethodCodec`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
FLUTTER_UNAVAILABLE("Unavailable on 2018-08-31. Deprecated on 2018-01-09. "
|
||||
"FlutterStandardBigInteger was needed because the Dart 1.0 int type had no "
|
||||
"size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed "
|
||||
"integer. If you need to communicate larger integers, use NSString encoding "
|
||||
"instead.")
|
||||
@interface FlutterStandardBigInteger : NSObject
|
||||
@end
|
||||
|
||||
/**
|
||||
* A codec for method calls and enveloped results.
|
||||
*
|
||||
* Method calls are encoded as binary messages with enough structure that the
|
||||
* codec can extract a method name `NSString` and an arguments `NSObject`,
|
||||
* possibly `nil`. These data items are used to populate a `FlutterMethodCall`.
|
||||
*
|
||||
* Result envelopes are encoded as binary messages with enough structure that
|
||||
* the codec can determine whether the result was successful or an error. In
|
||||
* the former case, the codec can extract the result `NSObject`, possibly `nil`.
|
||||
* In the latter case, the codec can extract an error code `NSString`, a
|
||||
* human-readable `NSString` error message (possibly `nil`), and a custom
|
||||
* error details `NSObject`, possibly `nil`. These data items are used to
|
||||
* populate a `FlutterError`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@protocol FlutterMethodCodec
|
||||
/**
|
||||
* Provides access to a shared instance this codec.
|
||||
*
|
||||
* @return The shared instance.
|
||||
*/
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
/**
|
||||
* Encodes the specified method call into binary.
|
||||
*
|
||||
* @param methodCall The method call. The arguments value
|
||||
* must be supported by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeMethodCall:(FlutterMethodCall*)methodCall;
|
||||
|
||||
/**
|
||||
* Decodes the specified method call from binary.
|
||||
*
|
||||
* @param methodCall The method call to decode.
|
||||
* @return The decoded method call.
|
||||
*/
|
||||
- (FlutterMethodCall*)decodeMethodCall:(NSData*)methodCall;
|
||||
|
||||
/**
|
||||
* Encodes the specified successful result into binary.
|
||||
*
|
||||
* @param result The result. Must be a value supported by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeSuccessEnvelope:(id _Nullable)result;
|
||||
|
||||
/**
|
||||
* Encodes the specified error result into binary.
|
||||
*
|
||||
* @param error The error object. The error details value must be supported
|
||||
* by this codec.
|
||||
* @return The binary encoding.
|
||||
*/
|
||||
- (NSData*)encodeErrorEnvelope:(FlutterError*)error;
|
||||
|
||||
/**
|
||||
* Deccodes the specified result envelope from binary.
|
||||
*
|
||||
* @param envelope The error object.
|
||||
* @return The result value, if the envelope represented a successful result,
|
||||
* or a `FlutterError` instance, if not.
|
||||
*/
|
||||
- (id _Nullable)decodeEnvelope:(NSData*)envelope;
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMethodCodec` using UTF-8 encoded JSON method calls and result
|
||||
* envelopes.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [JSONMethodCodec](https://api.flutter.dev/flutter/services/JSONMethodCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Values supported as methods arguments and result payloads are
|
||||
* those supported as top-level or leaf values by `FlutterJSONMessageCodec`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterJSONMethodCodec : NSObject <FlutterMethodCodec>
|
||||
@end
|
||||
|
||||
/**
|
||||
* A `FlutterMethodCodec` using the Flutter standard binary encoding.
|
||||
*
|
||||
* This codec is guaranteed to be compatible with the corresponding
|
||||
* [StandardMethodCodec](https://api.flutter.dev/flutter/services/StandardMethodCodec-class.html)
|
||||
* on the Dart side. These parts of the Flutter SDK are evolved synchronously.
|
||||
*
|
||||
* Values supported as method arguments and result payloads are those supported by
|
||||
* `FlutterStandardMessageCodec`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterStandardMethodCodec : NSObject <FlutterMethodCodec>
|
||||
/**
|
||||
* Create a `FlutterStandardMethodCodec` who will read and write to \p readerWriter.
|
||||
*/
|
||||
+ (instancetype)codecWithReaderWriter:(FlutterStandardReaderWriter*)readerWriter;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERCODECS_H_
|
||||
@@ -0,0 +1,102 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERDARTPROJECT_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERDARTPROJECT_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FlutterMacros.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* A set of Flutter and Dart assets used by a `FlutterEngine` to initialize execution.
|
||||
*
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterDartProject : NSObject
|
||||
|
||||
/**
|
||||
* Initializes a Flutter Dart project from a bundle.
|
||||
*
|
||||
* The bundle must either contain a flutter_assets resource directory, or set the Info.plist key
|
||||
* FLTAssetsPath to override that name (if you are doing a custom build using a different name).
|
||||
*
|
||||
* @param bundle The bundle containing the Flutter assets directory. If nil, the App framework
|
||||
* created by Flutter will be used.
|
||||
*/
|
||||
- (instancetype)initWithPrecompiledDartBundle:(nullable NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
|
||||
/**
|
||||
* Unavailable - use `init` instead.
|
||||
*/
|
||||
- (instancetype)initFromDefaultSourceForConfiguration API_UNAVAILABLE(macos)
|
||||
FLUTTER_UNAVAILABLE("Use -init instead.");
|
||||
|
||||
/**
|
||||
* Returns the default identifier for the bundle where we expect to find the Flutter Dart
|
||||
* application.
|
||||
*/
|
||||
+ (NSString*)defaultBundleIdentifier;
|
||||
|
||||
/**
|
||||
* An NSArray of NSStrings to be passed as command line arguments to the Dart entrypoint.
|
||||
*
|
||||
* If this is not explicitly set, this will default to the contents of
|
||||
* [NSProcessInfo arguments], without the binary name.
|
||||
*
|
||||
* Set this to nil to pass no arguments to the Dart entrypoint.
|
||||
*/
|
||||
@property(nonatomic, nullable, copy)
|
||||
NSArray<NSString*>* dartEntrypointArguments API_UNAVAILABLE(ios);
|
||||
|
||||
/**
|
||||
* Returns the file name for the given asset. If the bundle with the identifier
|
||||
* "io.flutter.flutter.app" exists, it will try use that bundle; otherwise, it
|
||||
* will use the main bundle. To specify a different bundle, use
|
||||
* `+lookupKeyForAsset:fromBundle`.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset;
|
||||
|
||||
/**
|
||||
* Returns the file name for the given asset.
|
||||
* The returned file name can be used to access the asset in the supplied bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param bundle The `NSBundle` to use for looking up the asset.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromBundle:(nullable NSBundle*)bundle;
|
||||
|
||||
/**
|
||||
* Returns the file name for the given asset which originates from the specified package.
|
||||
* The returned file name can be used to access the asset in the application's main bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param package The name of the package from which the asset originates.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset fromPackage:(NSString*)package;
|
||||
|
||||
/**
|
||||
* Returns the file name for the given asset which originates from the specified package.
|
||||
* The returned file name can be used to access the asset in the specified bundle.
|
||||
*
|
||||
* @param asset The name of the asset. The name can be hierarchical.
|
||||
* @param package The name of the package from which the asset originates.
|
||||
* @param bundle The bundle to use when doing the lookup.
|
||||
* @return the file name to be used for lookup in the main bundle.
|
||||
*/
|
||||
+ (NSString*)lookupKeyForAsset:(NSString*)asset
|
||||
fromPackage:(NSString*)package
|
||||
fromBundle:(nullable NSBundle*)bundle;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_FRAMEWORK_HEADERS_FLUTTERDARTPROJECT_H_
|
||||
@@ -0,0 +1,462 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINE_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINE_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "FlutterBinaryMessenger.h"
|
||||
#import "FlutterDartProject.h"
|
||||
#import "FlutterMacros.h"
|
||||
#import "FlutterPlugin.h"
|
||||
#import "FlutterTexture.h"
|
||||
|
||||
@class FlutterViewController;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* The dart entrypoint that is associated with `main()`. This is to be used as an argument to the
|
||||
* `runWithEntrypoint*` methods.
|
||||
*/
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
extern NSString* const FlutterDefaultDartEntrypoint;
|
||||
|
||||
/**
|
||||
* The default Flutter initial route ("/").
|
||||
*/
|
||||
// NOLINTNEXTLINE(readability-identifier-naming)
|
||||
extern NSString* const FlutterDefaultInitialRoute;
|
||||
|
||||
/**
|
||||
* The FlutterEngine class coordinates a single instance of execution for a
|
||||
* `FlutterDartProject`. It may have zero or one `FlutterViewController` at a
|
||||
* time, which can be specified via `-setViewController:`.
|
||||
* `FlutterViewController`'s `initWithEngine` initializer will automatically call
|
||||
* `-setViewController:` for itself.
|
||||
*
|
||||
* A FlutterEngine can be created independently of a `FlutterViewController` for
|
||||
* headless execution. It can also persist across the lifespan of multiple
|
||||
* `FlutterViewController` instances to maintain state and/or asynchronous tasks
|
||||
* (such as downloading a large file).
|
||||
*
|
||||
* A FlutterEngine can also be used to prewarm the Dart execution environment and reduce the
|
||||
* latency of showing the Flutter screen when a `FlutterViewController` is created and presented.
|
||||
* See http://flutter.dev/docs/development/add-to-app/performance for more details on loading
|
||||
* performance.
|
||||
*
|
||||
* Alternatively, you can simply create a new `FlutterViewController` with only a
|
||||
* `FlutterDartProject`. That `FlutterViewController` will internally manage its
|
||||
* own instance of a FlutterEngine, but will not guarantee survival of the engine
|
||||
* beyond the life of the ViewController.
|
||||
*
|
||||
* A newly initialized FlutterEngine will not actually run a Dart Isolate until
|
||||
* either `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI` is invoked.
|
||||
* One of these methods must be invoked before calling `-setViewController:`.
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterEngine : NSObject <FlutterPluginRegistry>
|
||||
|
||||
/**
|
||||
* Default initializer for a FlutterEngine.
|
||||
*
|
||||
* Threads created by this FlutterEngine will appear as "FlutterEngine #" in
|
||||
* Instruments. The prefix can be customized using `initWithName`.
|
||||
*
|
||||
* The engine will execute the project located in the bundle with the identifier
|
||||
* "io.flutter.flutter.app" (the default for Flutter projects).
|
||||
*
|
||||
* A newly initialized engine will not run until either `-runWithEntrypoint:` or
|
||||
* `-runWithEntrypoint:libraryURI:` is called.
|
||||
*
|
||||
* FlutterEngine created with this method will have allowHeadlessExecution set to `YES`.
|
||||
* This means that the engine will continue to run regardless of whether a `FlutterViewController`
|
||||
* is attached to it or not, until `-destroyContext:` is called or the process finishes.
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
* Initialize this FlutterEngine.
|
||||
*
|
||||
* The engine will execute the project located in the bundle with the identifier
|
||||
* "io.flutter.flutter.app" (the default for Flutter projects).
|
||||
*
|
||||
* A newly initialized engine will not run until either `-runWithEntrypoint:` or
|
||||
* `-runWithEntrypoint:libraryURI:` is called.
|
||||
*
|
||||
* FlutterEngine created with this method will have allowHeadlessExecution set to `YES`.
|
||||
* This means that the engine will continue to run regardless of whether a `FlutterViewController`
|
||||
* is attached to it or not, until `-destroyContext:` is called or the process finishes.
|
||||
*
|
||||
* @param labelPrefix The label prefix used to identify threads for this instance. Should
|
||||
* be unique across FlutterEngine instances, and is used in instrumentation to label
|
||||
* the threads used by this FlutterEngine.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)labelPrefix;
|
||||
|
||||
/**
|
||||
* Initialize this FlutterEngine with a `FlutterDartProject`.
|
||||
*
|
||||
* If the FlutterDartProject is not specified, the FlutterEngine will attempt to locate
|
||||
* the project in a default location (the flutter_assets folder in the iOS application
|
||||
* bundle).
|
||||
*
|
||||
* A newly initialized engine will not run the `FlutterDartProject` until either
|
||||
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI:` is called.
|
||||
*
|
||||
* FlutterEngine created with this method will have allowHeadlessExecution set to `YES`.
|
||||
* This means that the engine will continue to run regardless of whether a `FlutterViewController`
|
||||
* is attached to it or not, until `-destroyContext:` is called or the process finishes.
|
||||
*
|
||||
* @param labelPrefix The label prefix used to identify threads for this instance. Should
|
||||
* be unique across FlutterEngine instances, and is used in instrumentation to label
|
||||
* the threads used by this FlutterEngine.
|
||||
* @param project The `FlutterDartProject` to run.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)labelPrefix project:(nullable FlutterDartProject*)project;
|
||||
|
||||
/**
|
||||
* Initialize this FlutterEngine with a `FlutterDartProject`.
|
||||
*
|
||||
* If the FlutterDartProject is not specified, the FlutterEngine will attempt to locate
|
||||
* the project in a default location (the flutter_assets folder in the iOS application
|
||||
* bundle).
|
||||
*
|
||||
* A newly initialized engine will not run the `FlutterDartProject` until either
|
||||
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI:` is called.
|
||||
*
|
||||
* @param labelPrefix The label prefix used to identify threads for this instance. Should
|
||||
* be unique across FlutterEngine instances, and is used in instrumentation to label
|
||||
* the threads used by this FlutterEngine.
|
||||
* @param project The `FlutterDartProject` to run.
|
||||
* @param allowHeadlessExecution Whether or not to allow this instance to continue
|
||||
* running after passing a nil `FlutterViewController` to `-setViewController:`.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)labelPrefix
|
||||
project:(nullable FlutterDartProject*)project
|
||||
allowHeadlessExecution:(BOOL)allowHeadlessExecution;
|
||||
|
||||
/**
|
||||
* Initialize this FlutterEngine with a `FlutterDartProject`.
|
||||
*
|
||||
* If the FlutterDartProject is not specified, the FlutterEngine will attempt to locate
|
||||
* the project in a default location (the flutter_assets folder in the iOS application
|
||||
* bundle).
|
||||
*
|
||||
* A newly initialized engine will not run the `FlutterDartProject` until either
|
||||
* `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI:` is called.
|
||||
*
|
||||
* @param labelPrefix The label prefix used to identify threads for this instance. Should
|
||||
* be unique across FlutterEngine instances, and is used in instrumentation to label
|
||||
* the threads used by this FlutterEngine.
|
||||
* @param project The `FlutterDartProject` to run.
|
||||
* @param allowHeadlessExecution Whether or not to allow this instance to continue
|
||||
* running after passing a nil `FlutterViewController` to `-setViewController:`.
|
||||
* @param restorationEnabled Whether state restoration is enabled. When true, the framework will
|
||||
* wait for the attached view controller to provide restoration data.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)labelPrefix
|
||||
project:(nullable FlutterDartProject*)project
|
||||
allowHeadlessExecution:(BOOL)allowHeadlessExecution
|
||||
restorationEnabled:(BOOL)restorationEnabled NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate from the main Dart library (i.e. the library that
|
||||
* contains `main()`), using `main()` as the entrypoint (the default for Flutter projects),
|
||||
* and using "/" (the default route) as the initial route.
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)run;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate from the main Dart library (i.e. the library that
|
||||
* contains `main()`), using "/" (the default route) as the initial route.
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from the same Dart
|
||||
* library that contains the app's main() function. If this is FlutterDefaultDartEntrypoint (or
|
||||
* nil) it will default to `main()`. If it is not the app's main() function, that function must
|
||||
* be decorated with `@pragma(vm:entry-point)` to ensure the method is not tree-shaken by the Dart
|
||||
* compiler.
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate from the main Dart library (i.e. the library that
|
||||
* contains `main()`).
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from the same Dart
|
||||
* library that contains the app's main() function. If this is FlutterDefaultDartEntrypoint (or
|
||||
* nil), it will default to `main()`. If it is not the app's main() function, that function must
|
||||
* be decorated with `@pragma(vm:entry-point)` to ensure the method is not tree-shaken by the Dart
|
||||
* compiler.
|
||||
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
|
||||
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint
|
||||
initialRoute:(nullable NSString*)initialRoute;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate using the specified entrypoint and Dart library,
|
||||
* which may not be the same as the library containing the Dart program's `main()` function.
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from a Dart library. If this is
|
||||
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
|
||||
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
|
||||
* method is not tree-shaken by the Dart compiler.
|
||||
* @param uri The URI of the Dart library which contains the entrypoint method
|
||||
* (example "package:foo_package/main.dart"). If nil, this will default to
|
||||
* the same library as the `main()` function in the Dart program.
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint libraryURI:(nullable NSString*)uri;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate using the specified entrypoint and Dart library,
|
||||
* which may not be the same as the library containing the Dart program's `main()` function.
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from a Dart library. If this is
|
||||
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
|
||||
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
|
||||
* method is not tree-shaken by the Dart compiler.
|
||||
* @param libraryURI The URI of the Dart library which contains the entrypoint
|
||||
* method (example "package:foo_package/main.dart"). If nil, this will
|
||||
* default to the same library as the `main()` function in the Dart program.
|
||||
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
|
||||
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint
|
||||
libraryURI:(nullable NSString*)libraryURI
|
||||
initialRoute:(nullable NSString*)initialRoute;
|
||||
|
||||
/**
|
||||
* Runs a Dart program on an Isolate using the specified entrypoint and Dart library,
|
||||
* which may not be the same as the library containing the Dart program's `main()` function.
|
||||
*
|
||||
* The first call to this method will create a new Isolate. Subsequent calls will return
|
||||
* immediately and have no effect.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from a Dart library. If this is
|
||||
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
|
||||
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
|
||||
* method is not tree-shaken by the Dart compiler.
|
||||
* @param libraryURI The URI of the Dart library which contains the entrypoint
|
||||
* method (example "package:foo_package/main.dart"). If nil, this will
|
||||
* default to the same library as the `main()` function in the Dart program.
|
||||
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
|
||||
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
|
||||
* @param entrypointArgs Arguments passed as a list of string to Dart's entrypoint function.
|
||||
* @return YES if the call succeeds in creating and running a Flutter Engine instance; NO otherwise.
|
||||
*/
|
||||
- (BOOL)runWithEntrypoint:(nullable NSString*)entrypoint
|
||||
libraryURI:(nullable NSString*)libraryURI
|
||||
initialRoute:(nullable NSString*)initialRoute
|
||||
entrypointArgs:(nullable NSArray<NSString*>*)entrypointArgs;
|
||||
|
||||
/**
|
||||
* Destroy running context for an engine.
|
||||
*
|
||||
* This method can be used to force the FlutterEngine object to release all resources.
|
||||
* After sending this message, the object will be in an unusable state until it is deallocated.
|
||||
* Accessing properties or sending messages to it will result in undefined behavior or runtime
|
||||
* errors.
|
||||
*/
|
||||
- (void)destroyContext;
|
||||
|
||||
/**
|
||||
* Ensures that Flutter will generate a semantics tree.
|
||||
*
|
||||
* This is enabled by default if certain accessibility services are turned on by
|
||||
* the user, or when using a Simulator. This method allows a user to turn
|
||||
* semantics on when they would not ordinarily be generated and the performance
|
||||
* overhead is not a concern, e.g. for UI testing. Note that semantics should
|
||||
* never be programmatically turned off, as it would potentially disable
|
||||
* accessibility services an end user has requested.
|
||||
*
|
||||
* This method must only be called after launching the engine via
|
||||
* `-runWithEntrypoint:` or `-runWithEntryPoint:libraryURI`.
|
||||
*
|
||||
* Although this method returns synchronously, it does not guarantee that a
|
||||
* semantics tree is actually available when the method returns. It
|
||||
* synchronously ensures that the next frame the Flutter framework creates will
|
||||
* have a semantics tree.
|
||||
*
|
||||
* You can subscribe to semantics updates via `NSNotificationCenter` by adding
|
||||
* an observer for the name `FlutterSemanticsUpdateNotification`. The `object`
|
||||
* parameter will be the `FlutterViewController` associated with the semantics
|
||||
* update. This will asynchronously fire after a semantics tree has actually
|
||||
* built (which may be some time after the frame has been rendered).
|
||||
*/
|
||||
- (void)ensureSemanticsEnabled;
|
||||
|
||||
/**
|
||||
* Sets the `FlutterViewController` for this instance. The FlutterEngine must be
|
||||
* running (e.g. a successful call to `-runWithEntrypoint:` or `-runWithEntrypoint:libraryURI`)
|
||||
* before calling this method. Callers may pass nil to remove the viewController
|
||||
* and have the engine run headless in the current process.
|
||||
*
|
||||
* A FlutterEngine can only have one `FlutterViewController` at a time. If there is
|
||||
* already a `FlutterViewController` associated with this instance, this method will replace
|
||||
* the engine's current viewController with the newly specified one.
|
||||
*
|
||||
* Setting the viewController will signal the engine to start animations and drawing, and unsetting
|
||||
* it will signal the engine to stop animations and drawing. However, neither will impact the state
|
||||
* of the Dart program's execution.
|
||||
*/
|
||||
@property(nonatomic, weak) FlutterViewController* viewController;
|
||||
|
||||
/**
|
||||
* The `FlutterMethodChannel` used for localization related platform messages, such as
|
||||
* setting the locale.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*/
|
||||
@property(nonatomic, readonly, nullable) FlutterMethodChannel* localizationChannel;
|
||||
/**
|
||||
* The `FlutterMethodChannel` used for navigation related platform messages.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*
|
||||
* @see [Navigation
|
||||
* Channel](https://api.flutter.dev/flutter/services/SystemChannels/navigation-constant.html)
|
||||
* @see [Navigator Widget](https://api.flutter.dev/flutter/widgets/Navigator-class.html)
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterMethodChannel* navigationChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterMethodChannel` used for restoration related platform messages.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*
|
||||
* @see [Restoration
|
||||
* Channel](https://api.flutter.dev/flutter/services/SystemChannels/restoration-constant.html)
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterMethodChannel* restorationChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterMethodChannel` used for core platform messages, such as
|
||||
* information about the screen orientation.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterMethodChannel* platformChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterMethodChannel` used to communicate text input events to the
|
||||
* Dart Isolate.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*
|
||||
* @see [Text Input
|
||||
* Channel](https://api.flutter.dev/flutter/services/SystemChannels/textInput-constant.html)
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterMethodChannel* textInputChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterBasicMessageChannel` used to communicate app lifecycle events
|
||||
* to the Dart Isolate.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*
|
||||
* @see [Lifecycle
|
||||
* Channel](https://api.flutter.dev/flutter/services/SystemChannels/lifecycle-constant.html)
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterBasicMessageChannel* lifecycleChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterBasicMessageChannel` used for communicating system events, such as
|
||||
* memory pressure events.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*
|
||||
* @see [System
|
||||
* Channel](https://api.flutter.dev/flutter/services/SystemChannels/system-constant.html)
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterBasicMessageChannel* systemChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterBasicMessageChannel` used for communicating user settings such as
|
||||
* clock format and text scale.
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterBasicMessageChannel* settingsChannel;
|
||||
|
||||
/**
|
||||
* The `FlutterBasicMessageChannel` used for communicating key events
|
||||
* from physical keyboards
|
||||
*
|
||||
* Can be nil after `destroyContext` is called.
|
||||
*/
|
||||
@property(nonatomic, readonly) FlutterBasicMessageChannel* keyEventChannel;
|
||||
|
||||
/**
|
||||
* The depcreated `NSURL` of the Dart VM Service for the service isolate.
|
||||
*
|
||||
* This is only set in debug and profile runtime modes, and only after the
|
||||
* Dart VM Service is ready. In release mode or before the Dart VM Service has
|
||||
* started, it returns `nil`.
|
||||
*/
|
||||
@property(nonatomic, readonly, nullable)
|
||||
NSURL* observatoryUrl FLUTTER_DEPRECATED("Use vmServiceUrl instead");
|
||||
|
||||
/**
|
||||
* The `NSURL` of the Dart VM Service for the service isolate.
|
||||
*
|
||||
* This is only set in debug and profile runtime modes, and only after the
|
||||
* Dart VM Service is ready. In release mode or before the Dart VM Service has
|
||||
* started, it returns `nil`.
|
||||
*/
|
||||
@property(nonatomic, readonly, nullable) NSURL* vmServiceUrl;
|
||||
|
||||
/**
|
||||
* The `FlutterBinaryMessenger` associated with this FlutterEngine (used for communicating with
|
||||
* channels).
|
||||
*/
|
||||
@property(nonatomic, readonly) NSObject<FlutterBinaryMessenger>* binaryMessenger;
|
||||
|
||||
/**
|
||||
* The `FlutterTextureRegistry` associated with this FlutterEngine (used to register textures).
|
||||
*/
|
||||
@property(nonatomic, readonly) NSObject<FlutterTextureRegistry>* textureRegistry;
|
||||
|
||||
/**
|
||||
* The UI Isolate ID of the engine.
|
||||
*
|
||||
* This property will be nil if the engine is not running.
|
||||
*/
|
||||
@property(nonatomic, readonly, copy, nullable) NSString* isolateId;
|
||||
|
||||
/**
|
||||
* Whether or not GPU calls are allowed.
|
||||
*
|
||||
* Typically this is set when the app is backgrounded and foregrounded.
|
||||
*/
|
||||
@property(nonatomic, assign) BOOL isGpuDisabled;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINE_H_
|
||||
@@ -0,0 +1,115 @@
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_
|
||||
#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "FlutterEngine.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** Options that control how a FlutterEngine should be created. */
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterEngineGroupOptions : NSObject
|
||||
|
||||
/**
|
||||
* The name of a top-level function from a Dart library. If this is FlutterDefaultDartEntrypoint
|
||||
* (or nil); this will default to `main()`. If it is not the app's main() function, that function
|
||||
* must be decorated with `@pragma(vm:entry-point)` to ensure themethod is not tree-shaken by the
|
||||
* Dart compiler.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString* entrypoint;
|
||||
|
||||
/**
|
||||
* The URI of the Dart library which contains the entrypoint method. If nil, this will default to
|
||||
* the same library as the `main()` function in the Dart program.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString* libraryURI;
|
||||
|
||||
/**
|
||||
* The name of the initial Flutter `Navigator` `Route` to load. If this is
|
||||
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSString* initialRoute;
|
||||
|
||||
/**
|
||||
* Arguments passed as a list of string to Dart's entrypoint function.
|
||||
*/
|
||||
@property(nonatomic, copy, nullable) NSArray<NSString*>* entrypointArgs;
|
||||
@end
|
||||
|
||||
/**
|
||||
* Represents a collection of FlutterEngines who share resources which allows
|
||||
* them to be created with less time const and occupy less memory than just
|
||||
* creating multiple FlutterEngines.
|
||||
*
|
||||
* Deleting a FlutterEngineGroup doesn't invalidate existing FlutterEngines, but
|
||||
* it eliminates the possibility to create more FlutterEngines in that group.
|
||||
*
|
||||
* @warning This class is a work-in-progress and may change.
|
||||
* @see https://github.com/flutter/flutter/issues/72009
|
||||
*/
|
||||
FLUTTER_DARWIN_EXPORT
|
||||
@interface FlutterEngineGroup : NSObject
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* Initialize a new FlutterEngineGroup.
|
||||
*
|
||||
* @param name The name that will present in the threads shared across the
|
||||
* engines in this group.
|
||||
* @param project The `FlutterDartProject` that all FlutterEngines in this group
|
||||
* will be executing.
|
||||
*/
|
||||
- (instancetype)initWithName:(NSString*)name
|
||||
project:(nullable FlutterDartProject*)project NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
* Creates a running `FlutterEngine` that shares components with this group.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from a Dart library. If this is
|
||||
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
|
||||
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
|
||||
* method is not tree-shaken by the Dart compiler.
|
||||
* @param libraryURI The URI of the Dart library which contains the entrypoint method. IF nil,
|
||||
* this will default to the same library as the `main()` function in the Dart program.
|
||||
*
|
||||
* @see FlutterEngineGroup
|
||||
*/
|
||||
- (FlutterEngine*)makeEngineWithEntrypoint:(nullable NSString*)entrypoint
|
||||
libraryURI:(nullable NSString*)libraryURI;
|
||||
|
||||
/**
|
||||
* Creates a running `FlutterEngine` that shares components with this group.
|
||||
*
|
||||
* @param entrypoint The name of a top-level function from a Dart library. If this is
|
||||
* FlutterDefaultDartEntrypoint (or nil); this will default to `main()`. If it is not the app's
|
||||
* main() function, that function must be decorated with `@pragma(vm:entry-point)` to ensure the
|
||||
* method is not tree-shaken by the Dart compiler.
|
||||
* @param libraryURI The URI of the Dart library which contains the entrypoint method. IF nil,
|
||||
* this will default to the same library as the `main()` function in the Dart program.
|
||||
* @param initialRoute The name of the initial Flutter `Navigator` `Route` to load. If this is
|
||||
* FlutterDefaultInitialRoute (or nil), it will default to the "/" route.
|
||||
*
|
||||
* @see FlutterEngineGroup
|
||||
*/
|
||||
- (FlutterEngine*)makeEngineWithEntrypoint:(nullable NSString*)entrypoint
|
||||
libraryURI:(nullable NSString*)libraryURI
|
||||
initialRoute:(nullable NSString*)initialRoute;
|
||||
|
||||
/**
|
||||
* Creates a running `FlutterEngine` that shares components with this group.
|
||||
*
|
||||
* @param options Options that control how a FlutterEngine should be created.
|
||||
*
|
||||
* @see FlutterEngineGroupOptions
|
||||
*/
|
||||
- (FlutterEngine*)makeEngineWithOptions:(nullable FlutterEngineGroupOptions*)options;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERENGINEGROUP_H_
|
||||