Make the sweet and sour sauce first by whisking together the brown sugar, rice vinegar, ketchup, and soy sauce in a large bowl. Set aside.
Mix together the cornstarch, flour, and salt and pepper in a large bag or large bowl. Add the chicken and shake well to evenly coat the chicken.
Heat the oil in a large wok or pan to medium-high heat, until a small drop of cornstarch added sizzles up.
Tap off excess coating from the chicken chunks, then fry in the oil 1-2 minutes per side, or until golden brown and cooked through. Transfer the chicken to a plate. Do this in batches if needed so avoid overcrowding the wok.
Drain some of the excess oil if needed, and bring back to medium-high heat. Add the onion, peppers, and pineapple. Stir fry for 2-3 minutes, or until done to your liking.
Add the garlic and ginger and stir fry for 1 minute.
Stir in the sweet and sour sauce and mix well. Cook for 1-2 minutes to thicken.
Add the reserved chicken, stir to coat, and warm through. Serve immediately with rice and garnish.